Home > DeveloperSection > Forums > how to automatically click a html button when asp.net button is clicked
Manoj Bhatt
Manoj Bhatt

Total Post:153

Points:1079
Posted on    December-01-2014 10:02 PM

 ASP.Net C#  HTML5 
Ratings:


 1 Reply(s)
 574  View(s)
Rate this:

how to automatically click a html button when asp.net button is clicked. I want when I click btn then automatically Button1 which is a html button is clicked and performs the task... that means by pressing one button it internally works for two buttons



Kamlakar Singh
Kamlakar Singh

Total Post:194

Points:1396
Posted on    December-02-2014 6:34 AM

Attach the onclick event in the markup of the ASPX page (on the button):

onclick="#('elementName').click();"

Now, if you don't want the post back to occur on the ASP.NET button, then do this:

onclick="#('elementName').click(); return false;"


Don't want to miss updates? Please click the below button!

Follow MindStick