I’m using LinkButton(Consider it as Button) in ASP .Net. I need to click that button programmatically using C# code behind. How can I achieve this..?
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.
Don’t use event-handlers as methods, their only purpose is to handle events. All functionality should be encapsulated in methods that can be called from within the event-handler as well as from wherever you need it.
Then you can call this method for example from page’s load event as well:
How to pass the ID from the GridView record as
CommandArgument: