title: asp.net How to resume button's postback after ajax completion?
body: <p>I have a button and have postback function as btnSubmit.Click in the code behind. </p>
  
  <pre><code>&lt;asp:Button runat="server" ID="btnSubmit" Text="Submit"  UseSubmitBehavior="true" OnClientClick="ajaxCall(); return false;" /&gt;
  </code></pre>
  
  <p>Now, i want to do a pre-post action, which will call an ajax to do some calculation, and have a confirmation box to allow user to click "Ok" - resume original button's function do to the postback, or "Cancel" - simply just cancel the postback.</p>
  
  <pre><code>    &lt;script type="text/javascript" language="javascript"&gt;
      function ajaxCall() {
              $.ajax({
                  dataType: 'json',
                  type: 'GET',
                  contentType: "application/json; charset=utf-8",
                  url: "ODS.aspx/ClientCall",
                  success: function (msg) {
                      alert(msg);
                  }, error: function (data) {
                      alert(data);
                  }
              });
      }
  &lt;/script&gt;
  </code></pre>
  
  <p>I kept getting either only fire the confirmation box, but the "OK" won't work, or the postback will over the ajax. I know there must be a smart way to do this, to interrupt the normal button submit postback behavior, but don't want to introduce more controls, something like hiddenbutton or so, feels like very hacky way. Any thoughts?</p>