title: ModalPopupExtender Button Problem
body: <p>I am trying to figure out why my ModalPopupExtender keeps closing, everytime a user clicks either button its running the code behind because I put a break point in and it is breaking there, but the modalPopup immediately closes, which isnt good because if it has any errors in the process they cant be displayed. So how do I stop the modalpopup from closing itself? I didnt specify a OKControlID or a CancelControlID.</p>
  
  <p>Panel Code:</p>
  
  <pre><code>&lt;asp:Panel ID="Panele" runat="server" style="display: none; position:absolute; top: 50%; left: 35%; width: 500px; height: 350px; background-color: White; border: solid 1px black; padding-left: 15px; text-align: left;"&gt;
          &lt;asp:ImageButton ID="CloseEBtn" runat="server" 
          ImageUrl="images/CloseButton.png" style="float: right; margin-right: 3px; margin-top: 3px;" 
          onclick="CloseEBtn_Click" /&gt;
  &lt;strong&gt;Name:&lt;asp:TextBox ID="fromTextBox" runat="server"&gt;&lt;/asp:TextBox&gt;&lt;/strong&gt;
      &lt;asp:Button ID="SndBtn" runat="server" Text="Send" onclick="SndBtn_Click" /&gt;
  &amp;nbsp;&lt;asp:Button ID="ClrBtn" runat="server" Text="Clear" /&gt;
      &lt;br /&gt;
      &lt;br /&gt;
      &lt;asp:Label ID="msglabel" runat="server"&gt;&lt;/asp:Label&gt;
  &lt;/asp:Panel&gt;
  </code></pre>
  
  <p>My ModalPopupExtender Code:</p>
  
  <pre><code>&lt;asp:ModalPopupExtender ID="popup" runat="server" 
      TargetControlID="SIBtn" PopupControlID="Panele" BackgroundCssClass="modalBackground"&gt;
  &lt;/asp:ModalPopupExtender&gt;
  </code></pre>
  
  <p>CodeBehind:</p>
  
  <pre><code>    protected void SndBtn_Click(object sender, EventArgs e)
      {
          msglabel.Text = "The Window Didnt Close";
      }
      protected void ClrBtn_Click(object sender, EventArgs e)
      {
          fromTextBox.Text = "";
          toTextBox.Text = "";
          subjectTextBox.Text = "";
          MessageTextBox.Text = "";
          msglabel.Text = "";
      }
  </code></pre>