title: Make button visible when catching exception
body: <p>I have a modal div with a non-visible button and an iframe. The iframe takes the user to an external site (where they can enter a payment). Then, the iframe is directed back to my site so I can log the payment. If the payment does not process properly and throws an exception, I want the button to become visible and the iframe to be redirected to my error page. I am having trouble getting the button to show up.</p>
  
  <p>This is what the Page_Load looks like for the modal. This page_load takes place after the user has made the payment and was directed back to the site.</p>
  
  <pre><code>protected void Page_Load(object sender, EventArgs e)
  {
      errorDirect.Visible = false;
      try
      {
          //lots of code to process the payment
      }
      catch (Exception ex)
      {
          errorDirect.Visible = true;
          Response.Redirect("ErrorPage.aspx");
  }
  </code></pre>
  
  <p>This is what the modal div looks like, just an iframe and a button.</p>
  
  <pre><code>&lt;div id="overlay" runat="server"&gt;
      &lt;iframe id="iframe" name="my-iframe" style="width: 850px; height: 700px;" frameborder="0" &gt;&lt;/iframe&gt;
      &lt;input type="button" id="errorDirect" Value="Back to Login Page" runat="server" onclick="parent.error()" /&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>This site was originally written without modals and some of the users will need to continue using the old version of the site. The parent class of the modal div is the only class that can handle modals, which is why the button needs to show up and be outside of the redirected iframe. What I would like to know is why my button is not becoming visible and if there is anything I can do to resolve this issue. Note: when I am debugging, the value of errorDirect.Visible remains false.</p>