title: Solution for: Page.IsValid cannot be called before validation has taken place
body: <p>I am using a wizard control in which I have a next button that has causes validation = true.  I also have a checkbox that when changed, in the event handler, I set causes validation = false for the next button.  When that button is clicked - I get the following:</p>
  
  <p>Page.IsValid cannot be called before validation has taken place. It should be queried in the event handler for a control that has CausesValidation.</p>
  
  <p>Here is the code:</p>
  
  <pre><code>protected void chk_CheckChanged(object sender, EventArgs e)
      {
          CheckBox chk = (CheckBox)sender;
          ImageButton ibtnStepNext = (ImageButton)(this.WizardSummaryTemplate.CustomNavigationTemplateContainer.FindControl("StepNextButton"));
  
          ibtnStepNext.CausesValidation = (!chk.Checked);
  
      }
  </code></pre>
  
  <p>What would be the recommended solution to disabling validation for the next button so I don't see this error?</p>