I have A|B|C|D…..|Z link buttons on web forms . Now i have to add single event in code behind to handles all link buttons. How to do with C# asp.net
Share
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.
If you didn’t mean on dynamicaly setting events, you just set the same ethod in OnClick event for all buttons:
in code behind:
This should work…
Also, instead of OnClick, you could set CommandName and additionaly set CommandArgument for each LinkButton, to pass different parameters. Then, in code behind method signature, you should set CommandEventArgs instead of EventArgs.