title: button event on modal popup inside an update panel
body: <p>I am having a modal popup inside an update panel. I am having 2 buttons on that modal popup. But when I click on the button, the buttons event is not getting fired up. I have mentioned the id's of the buttons in the trigger part of the update panel. Here is my code.</p>
  
  <p>
      </p>
  
  <pre><code>    &lt;asp:ModalPopupExtender ID="MessageBox" runat="server" TargetControlID="FakeLabel"
          PopupControlID="pnl_Message" BackgroundCssClass="modalBackground" OkControlID="Btnok"&gt;
      &lt;/asp:ModalPopupExtender&gt;
      &lt;asp:Label ID="FakeLabel" runat="server" /&gt;
  
      &lt;asp:Panel ID="pnl_Message" runat="server" CssClass="popup_menu"
          BorderWidth="1" Width="40%"&gt;
          &lt;table width="100%"&gt;
              &lt;tr&gt;
                  &lt;td&gt;
                      &lt;asp:Button ID="btn_cancel" runat="server" Width="38px" OnClick="btn_cancel_Click"&gt;&lt;/asp:Button&gt;
  
                  &lt;/td&gt;
              &lt;/tr&gt;
              &lt;tr&gt;
                  &lt;td&gt;
                      &lt;asp:Button ID="Btnok" runat="server" Text="OK" Width="38px" OnClick="Btnok_Click" /&gt;
  
                  &lt;/td&gt;
  
              &lt;/tr&gt;
          &lt;/table&gt;
      &lt;/asp:Panel&gt;
  
  &lt;/ContentTemplate&gt;
          &lt;Triggers&gt;
              &lt;asp:PostBackTrigger ControlID="Button1" /&gt;
              &lt;asp:PostBackTrigger ControlID="btn_Update" /&gt;
              &lt;asp:PostBackTrigger ControlID="btn_Delete" /&gt;
              &lt;asp:PostBackTrigger ControlID="btn_Clear" /&gt;
  
              &lt;asp:PostBackTrigger ControlID="btn_cancel" /&gt;
              &lt;asp:PostBackTrigger ControlID="Btnok" /&gt;
          &lt;/Triggers&gt;
  
      &lt;/asp:UpdatePanel&gt;
  </code></pre>
  
  <p>cs code :</p>
  
  <pre><code>    pnl_Message.Visible = true;
      MessageBox.Show();
  
  
  protected void Btnok_Click(object sender, EventArgs e)
      {
          try
          {
  
          }
          catch (Exception ex)
          {
  
              lbl_mesg.Text = ex.Message;
          }
      }
  </code></pre>
  
  <p>My btnok event is not getting fired up. How do i solve the problem. Please help.</p>