Click here to Skip to main content
16,008,750 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
hi members
i want display a popup window in asp.net
i want to display a gridview on it
i tried this code and it did not work for me
please help

What I have tried:

   <asp:ScriptManager ID="asm" runat="server" />

<asp:button id="ClientButton" runat="server" text="Button" />
                         <ajaxToolkit:ModalPopupExtender ID="mpe" runat="server"
 TargetControlId="ClientButton" PopupControlID="ModalPanel" 
 OkControlID="OKButton" BackgroundCssClass="modalBackground" />
            <asp:Panel ID="ModalPanel" runat="server" Width="500px" BackColor="#3366FF" BorderColor="#FF33CC" BorderStyle="Dotted" CssClass="modapopup">
 ASP.NET AJAX is a free framework for quickly creating a new generation of more efficient,
 more interactive and highly-personalized Web experiences that work across all the
 most popular browsers.<br />
 <asp:Button ID="OKButton" runat="server" Text="Close" />
</asp:Panel>
Posted
Updated 14-Dec-20 5:12am
Comments
BabyYoda 14-Dec-20 9:24am    
A modalpopextender is one way to do it so what was the problem?

You can also use jqueryui dialog or bootstrap dialog. Lots of options.
Member 14207792 14-Dec-20 9:29am    
my problem when i execute it appear like a part of a form this in test project
in my work webpage nothing appear

1 solution

 
Share this answer
 
Comments
Member 14207792 15-Dec-20 4:28am    
i am still not resolved this problem
i want popup that display a gridview and it can be moving like a msgbox
please help
Richard MacCutchan 15-Dec-20 4:31am    
Please use the Improve question link above, add the code that you have and explain what the problem is. We cannot help when your only question is "I want ...".
Member 14207792 15-Dec-20 4:41am    
this is the best result i got
 <asp:ScriptManager ID="asm" runat="server" />

<asp:button id="ClientButton" runat="server" text="Button" />
                         <ajaxToolkit:ModalPopupExtender ID="mpe" runat="server"
 TargetControlId="ClientButton" PopupControlID="ModalPanel" 
 OkControlID="OKButton" BackgroundCssClass="modalBackground" />
            <asp:Panel ID="ModalPanel" runat="server" Width="500px" BackColor="#3366FF" BorderColor="#FF33CC" BorderStyle="Dotted" CssClass="modapopup">
 ASP.NET AJAX is a free framework for quickly creating a new generation of more efficient,
 more interactive and highly-personalized Web experiences that work across all the
 most popular browsers.<br />
 <asp:Button ID="OKButton" runat="server" Text="Close" />
</asp:Panel>

but it is not like a popup it look like a part of form and when i put it in the form that already contain a data on all the form like a textbox and gridview
and on click the button to show that popup created nothing show but in blanc page it appear only the text not like a msgbox
Member 14207792 15-Dec-20 6:24am    
yes i managed to get it work the panel it was in view(when i removed from the view it work normaly)
after the click of button to display the popup not work only work to show the popup
why is that?
Richard MacCutchan 15-Dec-20 6:39am    
Sorry, I am not an expert in this. I suggest you do what I suggested above, and update your question with more (and clearer) details.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900