HOW TO AUTOMATICALLY CLICK A HTML BUTTON WHEN ASP.NET BUTTON IS CLICKED

Manoj Bhatt

Total Post:154

Points:1086
Posted by  Manoj Bhatt
C#  HTML5 
 945  View(s)
Ratings:
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

  1. Kamlakar Singh

    Post:194

    Points:1396
    Re: how to automatically click a html button when asp.net button is clicked

    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;"

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!