title: OnClick Event Not Firing on Button Click ASP.NET
body: <p>I have an asp:Button that is in a JavaScript dialog window. It has an OnClick event called DialogWindowButton_Click as you can see in the code below. The event is not firing and I have put breakpoints in the C# file and it is not even entering the function. I'm not sure why and have looked at other forum posts to try to figure this out. I have 1) deleted the button and recreated the button and OnClick event themselves (this didn't work), and 2) added CausesValidation="False" to the asp:Button tag. Neither avenue has worked. What I have is shown below: </p>
  
  <pre><code>&lt;div style="margin:auto; width:100px; padding-bottom:15px;"&gt;
      &lt;asp:Button ID="DialogWindowButton" runat="server" Text="Save Entry" 
      OnClick="DialogWindowButton_Click" CausesValidation="False"/&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Then in the C# file, I have: </p>
  
  <pre><code>    ...
      protected void Page_Load(object sender, EventArgs e)
      {
  
      }
  
      protected void DialogWindowButton_Click(object sender, EventArgs e)
      {
          DialogWindowButton_ClickHelper();
          ...
      }
  
      protected AddressBookEntry DialogWindowButton_ClickHelper()
      {
          ...
      }
      ...
  </code></pre>
  
  <p>I have the correct file for the CodeBehind tag as well as for the Inherits tag. In the C# file you can see that the original OnClick event calls on a helper function defined directly below it, but breakpoints in the top of DialogWindowButton_Click() aren't being reached. There are no build errors either. Could there be something else I'm missing? Thank you!</p>