Thanks In Advance,
- Edited by Ashish Tripathi Tuesday, July 12, 2011 7:21 AM Code preview in aspx
You should be able to trigger the click event on the btnSubmit button.
This will cause a postback and firing of btnSubmit_Click.
To trigger click you would write like this
- Edited by Andreas JohanssonModerator Tuesday, July 12, 2011 1:13 PM Added link to ASP.NET forums
You may either try
Sever controls has acquire a client id in the html mark up according to the hierarchy of the controls which is not exactly look like the id you assigned. So at client side we need to use the ClientId. Or if you sure the control having a unique id then you can set the client ID mode to static. So the id you given won't change. This has to be done with care because if two controls at different hierarchies (one on the page and one may be from a user control and both has client id mode static) will cause problems.
this post is going to be a repeatation of Albin Abel,
to sum up, put this property to your button then in your client side your button name will be same as you give otherwise asp.net could change your button ID.
have a look at this article to learn the ClientIDMode.
I'm so sure you will not press to "Mark As Answer". and "Mark as Helpful".