title: Asp .net Modal popup control cancelbutton ? Cancel Contol?
body: <p>in web applicaiton,[asp.net] i am using modal popu control, it is working fine, but in modal popup close button [cancel button] event, i write a code for redirecting to another page but it is not reirecting [may be event is not firing], can you help me.</p>
  
  <pre><code>&lt;asp:Panel ID ="slideshow1" runat ="server" &gt;
      &lt;asp:GridView ID ="grd" runat ="server" &gt;&lt;/asp:GridView&gt;
      &lt;asp:Button ID ="btnClos" runat ="server" onclick="btnClos_Click" Text ="X close" /&gt;
  &lt;/asp:Panel&gt;
  
  &lt;asp:ModalPopupExtender ID="ModalPopupExtender1" runat="server" TargetControlID ="btn"
      CancelControlID="btnClos"  PopupControlID="slideshow1" BackgroundCssClass="modalBackground"&gt;
  &lt;/asp:ModalPopupExtender&gt;
  &lt;asp:Button ID ="btn" runat ="server" style="display:none;" /&gt;
  </code></pre>