title: How to call a asp:Button OnClick event using JavaScript?
body: <p>I have a question, I have a button like below:</p>
  
  <pre><code>&lt;asp:Button ID="savebtn" runat="server" OnClick="savebtn_Click" Visible="false" /&gt;
  </code></pre>
  
  <p>I then have HTML button like like below:</p>
  
  <pre><code>&lt;button id="btnsave" onclick="fncsave"&gt;Save&lt;/button&gt;
  </code></pre>
  
  <p>I have the javascript below:</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
       function fncsave()
       {
          document.getElementById('&lt;%= savebtn.OnClick %&gt;').click()
       }
  &lt;/script&gt;
  </code></pre>
  
  <p>My question now is, how can I call the asp:Button OnClick from the HTML button? I have read you can do this by calling from JavaScript by Id but is not working.</p>
  
  <p>Any help will be really appreciate it.</p>
  
  <p>Thank you</p>