title: Disabled asp.net button disables validation for button
body: <p>I have an aspx page that contains a checkbox, and a button.  The button is disabled by default until the user checks the checkbox.  It looks like when I add the attribute enabled="false" to the button, it removes the validation.  When the button is enabled, I still want the validation to work.  Here is the code and markup for the different parts.</p>
  
  <p>Checkbox:</p>
  
  <pre><code>&lt;asp:CheckBox runat="server" ID="termsCheckBox" /&gt;
  &lt;label style="display: inline;"&gt;
  I agree to the Terms &amp; Conditions&lt;/label&gt;
  </code></pre>
  
  <p>Button:</p>
  
  <pre><code>&lt;asp:Button runat="server" ID="registerButton" OnClick="registerButton_Click1" 
  Text="Register" Enabled="false" ValidationGroup="accountValidation" /&gt;
  </code></pre>
  
  <p>JQuery:</p>
  
  <pre><code>&lt;script type="text/javascript" language="javascript"&gt;
  $(document).ready(function () {
      $('#&lt;%=termsCheckBox.ClientID %&gt;').click(function () {
          var checked = $(this).val();
  
          if (checked != undefined)
              $('#&lt;%=registerButton.ClientID %&gt;').removeAttr('disabled');
          else
              $('#&lt;%=registerButton.ClientID %&gt;').attr('disabled', 'disabled');
      });
  });
  &lt;/script&gt;
  </code></pre>