D
Darth Continent
Hello, I'm trying to replicate the functionality presented here
specific to the ModalPopup control:
http://ajax.asp.net/ajaxtoolkit/ModalPopup/ModalPopup.aspx
I've created a C# Ajax-enabled website project, have added the
ScriptManager, ModalPopup, Panel and various Button controls, but
although I've bound the ModalPopup to the button I want to have it use
to activate my modal Panel, and though the project builds successfully,
it doesn't react in the same way as the sample.
Here's the code from my skin file:
1 <%@ Page Language="C#" trace="true" AutoEventWireup="true"
CodeFile="Default.aspx.cs" Inherits="_Default" %>
2
3 <%@ Register Assembly="AjaxControlToolkit"
Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>
4
5 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
6 <html xmlns="http://www.w3.org/1999/xhtml">
7 <head>
8 <title>Untitled Page</title>
9 </head>
10 <body>
11
12 <form runat="server">
13
14 <asp:ScriptManager ID="ScriptManager1" runat="server"
EnablePartialRendering="true"></asp:ScriptManager>
15
16 <asp
anel ID="Panel1" runat="server" Height="50px"
Width="125px" Visible="False" >
17
18 <asp:Button ID="OkButton" runat="server"
Text="OK"></asp:Button>
19 <asp:Button ID="CancelButton" runat="server"
Text="Cancel"></asp:Button>
20
21 </asp
anel>
22
23 <ajaxToolkit:ModalPopupExtender ID="ModalPopupExtender1"
runat="server"
24 TargetControlID="btnAddServer"
25 PopupControlID="Panel1"
26 BackgroundCssClass="modalBackground"
27 DropShadow="true"
28 OkControlID="OkButton"
29 OnOkScript="onOk()"
30 CancelControlID="CancelButton" />
31
32 <br />
33 <center>
34
35
36 <asp
anel ID="PanelMain" runat="server" Height="25px"
Width="125px" HorizontalAlign="Center">
37
38 <asp:Button ID="btnAddServer" runat="server"
Text="Add" Width="33px" /></td>
39
40 </asp
anel>
41
42 </form>
43
44 </body>
45 </html>
46
At this point, I'm guessing that the missing piece of the puzzle lies
with the CSS stuff and/or the master page, as that I haven't brought
over from the sample project utilizing ModalPopup. Can someone please
help me pinpoint what I'm missing that is preventing this from working?
Thanks in advance for any help.
specific to the ModalPopup control:
http://ajax.asp.net/ajaxtoolkit/ModalPopup/ModalPopup.aspx
I've created a C# Ajax-enabled website project, have added the
ScriptManager, ModalPopup, Panel and various Button controls, but
although I've bound the ModalPopup to the button I want to have it use
to activate my modal Panel, and though the project builds successfully,
it doesn't react in the same way as the sample.
Here's the code from my skin file:
1 <%@ Page Language="C#" trace="true" AutoEventWireup="true"
CodeFile="Default.aspx.cs" Inherits="_Default" %>
2
3 <%@ Register Assembly="AjaxControlToolkit"
Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>
4
5 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
6 <html xmlns="http://www.w3.org/1999/xhtml">
7 <head>
8 <title>Untitled Page</title>
9 </head>
10 <body>
11
12 <form runat="server">
13
14 <asp:ScriptManager ID="ScriptManager1" runat="server"
EnablePartialRendering="true"></asp:ScriptManager>
15
16 <asp
![Stick Out Tongue :P :P](/styles/default/custom/smilies/tongue.gif)
Width="125px" Visible="False" >
17
18 <asp:Button ID="OkButton" runat="server"
Text="OK"></asp:Button>
19 <asp:Button ID="CancelButton" runat="server"
Text="Cancel"></asp:Button>
20
21 </asp
![Stick Out Tongue :P :P](/styles/default/custom/smilies/tongue.gif)
22
23 <ajaxToolkit:ModalPopupExtender ID="ModalPopupExtender1"
runat="server"
24 TargetControlID="btnAddServer"
25 PopupControlID="Panel1"
26 BackgroundCssClass="modalBackground"
27 DropShadow="true"
28 OkControlID="OkButton"
29 OnOkScript="onOk()"
30 CancelControlID="CancelButton" />
31
32 <br />
33 <center>
34
35
36 <asp
![Stick Out Tongue :P :P](/styles/default/custom/smilies/tongue.gif)
Width="125px" HorizontalAlign="Center">
37
38 <asp:Button ID="btnAddServer" runat="server"
Text="Add" Width="33px" /></td>
39
40 </asp
![Stick Out Tongue :P :P](/styles/default/custom/smilies/tongue.gif)
41
42 </form>
43
44 </body>
45 </html>
46
At this point, I'm guessing that the missing piece of the puzzle lies
with the CSS stuff and/or the master page, as that I haven't brought
over from the sample project utilizing ModalPopup. Can someone please
help me pinpoint what I'm missing that is preventing this from working?
Thanks in advance for any help.