Answered by:
Modal example from tutorial website not working 1:1 copy

Question
-
User507956310 posted
HI,
I followed this tutorial.
1:1 I copied it into my project.
But the modal does not open.
If I remove the display:none (then it shows) but using the
"close" button. It does not close.
Why is that?
http://www.aspsnippets.com/Articles/Building-Modal-Popup-using-ASPNet-AJAX-ModalPopupExtender-Control.aspx
Sunday, April 20, 2014 4:08 AM
Answers
-
User-1025250470 posted
please check AjaxToolkit reference is added to your project.
Thank You
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Sunday, April 20, 2014 4:19 AM -
-
User2103319870 posted
Please try with the sample code
<asp:ToolkitScriptManager ID="ToolkitScriptManager2" runat="server" ScriptMode="Release" CombineScripts="false"> </asp:ToolkitScriptManager> <asp:Button ID="btnOpen" runat="server" Text="Open PopUp" /> <asp:Panel ID="Panel3" runat="server" CssClass="modalPanel" > <table width="100%"> <tr> <td> Name </td> <td> <asp:TextBox ID="Name" runat="server"></asp:TextBox> </td> </tr> </table> </asp:Panel> <asp:ModalPopupExtender BackgroundCssClass="modalBg" DropShadow="true" ID="ModalPopupExtender1" PopupControlID="Panel3" runat="server" TargetControlID="btnOpen"> </asp:ModalPopupExtender>
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Monday, April 21, 2014 12:50 AM
All replies
-
User-1025250470 posted
please check AjaxToolkit reference is added to your project.
Thank You
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Sunday, April 20, 2014 4:19 AM -
-
User2103319870 posted
Please try with the sample code
<asp:ToolkitScriptManager ID="ToolkitScriptManager2" runat="server" ScriptMode="Release" CombineScripts="false"> </asp:ToolkitScriptManager> <asp:Button ID="btnOpen" runat="server" Text="Open PopUp" /> <asp:Panel ID="Panel3" runat="server" CssClass="modalPanel" > <table width="100%"> <tr> <td> Name </td> <td> <asp:TextBox ID="Name" runat="server"></asp:TextBox> </td> </tr> </table> </asp:Panel> <asp:ModalPopupExtender BackgroundCssClass="modalBg" DropShadow="true" ID="ModalPopupExtender1" PopupControlID="Panel3" runat="server" TargetControlID="btnOpen"> </asp:ModalPopupExtender>
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Monday, April 21, 2014 12:50 AM