title: ASP.NET WebForms, how to call a server method from javascript
body: <p>I want to execute a method from a server side. I am using ASP.NET WebForm. I am subscribed to a button click dynamically with jquery</p>
  
  <pre><code>$('input[value="execute"]').bind("click", myJavaScriptFunction);
  </code></pre>
  
  <p>I am not using this way</p>
  
  <pre><code>&lt;asp:Button ID="btnSend" runat="server" CssClass="modalButton" Text="execute" OnClick="btnSend_Click" /&gt;
  </code></pre>
  
  <p>because I want to display a confirm dialog before the execution of the click event if OK button was pressed</p>
  
  <pre><code>var myJavaScriptFunction = function (e)
  {
      if (window.confirm('Are you sure?')) {
          //HERE I WANT TO PERFORM A CALL TO btnSend_Click with null, null PARAMETERS
      }
  }
  </code></pre>
  
  <p>Can I do the same behavior in a different way?</p>