title: Asp.Net button onclientclick problem
body: <p>I have a strange problem, it seems, that I don't know how to solve.
  I have a button like this:</p>
  
  <pre><code>&lt;asp:Button ID="btnSave" runat="server" ClientIDMode="Static" Text="Save" OnClientClick="return ConfirmSave();" OnClick="btnSave_Click" /&gt;
  </code></pre>
  
  <p>If I write my client function like the following, it works as expected:</p>
  
  <pre><code>function ConfirmSave()
  {
    return confirm('Confirm?');
  }
  </code></pre>
  
  <p>But I should check, inside the function, for the confirm result, like this:</p>
  
  <pre><code>    function ConfirmSave() 
      {
        if (Page_ClientValidate('validationGroup'))
        {
          var conf = confirm("Confirm?");
  
          if (conf)
          {
               $('#btnSave').attr('disabled', 'disabled');
          }
  
          return conf;
        }
        else
          return false;
     }
  </code></pre>
  
  <p>Doing this, the page postback but the server click event doesn't fire.</p>
  
  <p>Anyone could help? Thanks</p>