can someone please explain to me how i can get the Text property of the linklabel that i have created at runtime?
I have tried:
string str = e.Link.LinkData;
…but that just displays an empty messagebox.
Thanks lots 🙂
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
EDIT: Now that we know the type of
e, try:If the
LinkLabel.Linkdoesn’t have enough information, you’ll have to refer to theLinkLabelitself. That may be the sender of the event (as suggested by MusiGenesis) but if it’s not, I suggest you use a lambda expression or anonymous method to subscribe to the event – that way you can capture theLinkLabeland refer to theTextproperty directly.