title: Show/Hide panels in ASP.net C# after submitting form
body: <p>So in the process of combining my default.aspx form page with the confirm.aspx confirmation page, I had to create panels and show/hide them at the initial loading of the page.</p>
  
  <p>The form is a comment/complaint form, so users will submit their info, and an e-mail is generated and sent to a web master. </p>
  
  <p>I have 4 panels: Panels 1 + 3 show by default and are set to visible early in the script like so: </p>
  
  <pre><code>protected void Page_Load(object sender, EventArgs e)
  {
      Panel1.Visible = true;
      Panel2.Visible = false;
      Panel3.Visible = true;
      Panel4.Visible = false;
  }
  </code></pre>
  
  <p>Basically, I want panels 1+3 to become hidden, and 2 + 4 to become visible once the user submits the form and no errors are found within the forum. </p>
  
  <p>Would I run the script to change the visibility at the <code>try</code> function when an email is sent, or right before the <code>frmReset</code> function? </p>
  
  <p>Also, is there a specific function I need that will switch the panels visibility AFTER submitting the form with no errors found? (Other than changing visibility to <code>true</code> or <code>false</code>)</p>