title: Asp:Button - if OnClientClick = True | False
body: <pre><code>&lt;asp:Button ID="Invoice" runat="server" Text="Create Invoice" OnClientClick="CreateInvoice_Click()" OnClick="CreateInvoice_Click1"/&gt;
  
  
  
          &lt;script type="text/javascript" language="javascript"&gt;
                     function Create_Invoice() {
                      $("#dialog-confirm").dialog({
                          resizable: false,
                          height: 180,
                          modal: true,
                          buttons: {
                              Create: function () {
                                  $(this).dialog("close");
                              },
                              Cancel: function () {
                                //code needed here
                                  $(this).dialog("close");
                              }
                          }
                      });
                  }
                  &lt;/script&gt;
  
  
  
      &lt;p&gt;&lt;span class="ui-icon ui-icon-alert" style="float: left; margin: 0 7px 20px 0;"&gt;&lt;/span&gt;Are you sure?&lt;/p&gt;
  </code></pre>
  
  <p>So user presses the 'Create Invoice' button, pop up appears allowing the user to select 'Create' or 'Cancel'. </p>
  
  <p>The 'CreateInvoice_Click' function is run on code behind if the user clicks 'create' or 'cancel'. What I want to know (which needs to go inside the 'cancel' function') how do I say ignore the OnClick="CreateInvoice_Click1" if cancelled is clicked.?</p>
  
  <p>Thanks for any replies</p>