title: Can Bootbox.confirm work synchronously?
body: <p>In an aspx page, there is an asp:linkbutton like this:</p>
  
  <pre><code>&lt;asp:LinkButton runat="server" ID="btExit" Text="Exit"
                  OnClientClick="javascript:return confirmExit();" 
                  EnableViewState="false" 
                  OnClick="ExitButtonClick"&gt;&lt;/asp:LinkButton&gt;
  </code></pre>
  
  <p>And this is the javascript function:</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  function confirmExit() {
      bootbox.confirm("Are you sure?", function (confirmed) {
          return confirmed;
      });
  }
  &lt;/script&gt;
  </code></pre>
  
  <p>The problem is that, as far as I know, bootbox.confirm works asynchronously, and ExitButtonClick function on code behind is executed without waiting for the user confirmation.</p>
  
  <p>I found a solution that works, using a hidden button:</p>
  
  <pre><code>&lt;asp:LinkButton runat="server" ID="btExit" Text="Exit"&gt;&lt;/asp:LinkButton&gt;
  &lt;asp:Button runat="server" ID="btExitHidden" onclick="ExitButtonClick" style="display:none;" /&gt;
  </code></pre>
  
  <p>And this is the javascript part:</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
      $("#btExit").click(function (e) {
          e.preventDefault();
          bootbox.confirm("Are you sure?", function (confirmed) {
              if (confirmed) {
                  $("#btExitHidden").click();
              }
          });
      });
  &lt;/script&gt;
  </code></pre>
  
  <p>My question is if there is a more "beautiful" and "standard" way to work synchronously with a Bootbox.confirm, without using a hidden button.</p>