title: How to prevent my ASP.NET checkbox from being reset on postback?
body: <p>I call the following code:</p>
  
  <pre><code>protected void Page_Load(object sender, EventArgs e)
  {
      //Note that this is not my actual code
      //this illustrates what happens
      if(IsPostBack)
      {
          CheckBox1.Checked = true;
      }
  }
  </code></pre>
  
  <p>but as a result, after a postback the checkbox does not honor my command to set it to 'true' and resets somewhere down the code to whatever user selected in the control.</p>
  
  <p>How to prevent that from happening?</p>