How to open a modal popup extender with a gridview

919 Views Asked by At

I want to open a Ajax ModalPopup extender control which contains a gridview.I searched thro Google, but I couldnt find a proper solution. Can anyone send me a sample codebase for opening gridview in Ajax ModalPopup extender control.

Thanks in Advance

1

There are 1 best solutions below

0
On

place the grid you want to show in the panel

   <asp:Button ID="btnShowPopup" runat="server" style="display:none" />       
     <asp:ModalPopupExtender ID="ModalPopupExtender_PreReq" runat="server" TargetControlID="btnShowPopup" PopupControlID="pnlPrereq"
                        CancelControlID="Button_Close" BackgroundCssClass="modalBackground">
                        </asp:ModalPopupExtender>
                        <asp:Panel ID="pnlPrereq" runat="server" Style="display: none">
    <asp:Button ID="Button_Close" runat="server" Text="Close" />         
 </asp:Panel>

In any event you can call this.Modalpopupid.show(); to display the grid view in modalpopup