title: .net Button fired only once
body: <p>Okay, here is my problem:</p>
  
  <p>I have a form that requires to have two fieldsets that are almost identical but that collect different sets of data. These are contained in an UpdatePanel. The user enters the data in a form, and when they hit the "Add"
   button, this row is inserted into DataTable. The user should be able to enter as many rows as she wishes.</p>
  
  <p>Since they are almost identical, I first got one working correctly, and then I used it as the base for the second one.</p>
  
  <p>The problem is that now they the "Add" button is only triggered once. When I try to hit it again, nothing happens. No postback occurs.</p>
  
  <p>I did some reasearch, and they advised to do register the buttons to the script manager
  <a href="https://stackoverflow.com/questions/786482/asp-net-button-click-event-not-firing">ASP.Net button click event not firing</a></p>
  
  <p>This didn't solve the problem.</p>
  
  <p>Any ideas of what else I can try?</p>
  
  <p>Edit 3:
  <strong>Solution:</strong>
  <strong>The problem was asp:RegularExpressionValidator with EnabledClientScript="true".</strong> It seems that the the control's javascript to validate collides and breaks the asp:Button's javascript when the control is rendered. If I disabled the ClientScript, then the buttons work.</p>
  
  <p>The suggestion to look into the life cycle lead me to the right answer. The problem was that there wasn't any lifecycle happening on code behind. So after examining what the buttons renders into, it meant that it had to be a javascript related problem.</p>
  
  <p>Edit 2:
  I disabled the asp:Validation controls and it is working. Any insights into this?</p>
  
  <p>Edit 1:</p>
  
  <p>Here is some code relevant to the issue </p>
  
  <p>the button markup:</p>
  
  <pre><code>&lt;td &gt;
              &lt;asp:Button ID="btnPrNew" Text="Add" OnClick="btnPrNew_Click" runat="server" /&gt;
  &lt;/td&gt;
  </code></pre>
  
  <p>And this is function than handled the onclick event</p>
  
  <pre><code>protected void btnPrNew_Click(object sender, EventArgs e)
  {
      if (prQuantityValidator.IsValid &amp;&amp; prPriceValidator.IsValid)
      {
          permanentRepairs = newItemizedDT();
          permanentRepairsTotal = populateDT(gvEstimatePermanentRepairs,    permanentRepairs) + addNewPrRow(); ;
  
          updateSubtotal(totalPermanentRepairs, permanentRepairsTotal);
  
          bindData(permanentRepairs, gvEstimatePermanentRepairs);
          clearPrForm();
      }
      else
      {
          erErrorMessage.Text = "Please enter only number amounts in Quantity and Unit Price field.";
      }
  }
  </code></pre>