我没有使用asp.net在ajax中获得弹出式MODAL :( [英] i am not getting a popup MODAL in ajax using asp.net :(
本文介绍了我没有使用asp.net在ajax中获得弹出式MODAL :(的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
CSS
< style type = text / css >
.modal
{
职位:绝对;
z-index:7000px;
top:0px;剩余
:0px;
背景色:灰色;
filter:alpha(opacity = 60);
-moz-opacity:0.6;
不透明度:0.6;
}
< / style < span class =code-keyword>>
ASP.NET
< body>
< form id =form1runat =server>
< asp:ScriptManager ID =smrunat =server>
< asp:Button ID = clickbtnnrunat =serverText =click/>
< asp:Panel ID =Panel1runat =serverBorderColor = AliceBlueBorderWidth =2pxHeight =350pxWidth =350pxBorderStyle =Solid>
< asp:Button ID =okbtnrunat =serverText =点击/>
< asp:Button ID =cnlbtnrunat =serverText =click/>
< ajaxToolkit:ModalPopupExtender ID =ModalPopupExtender1runat =serverDropShadow =trueOkControlID =okbtnCancelControlID =cnlbtn BackgroundCssClass =modalTargetControlID =clickbtnnPopupControlID =Panel1>
< / form> ;
< / body>
解决方案
试试这个
< pre lang =xml> < html xmlns = http://www.w3 .org / 1999 / xhtml >
< head id = Head1 runat = < span class =code-keyword> server >
< title > < / title >
< script type = text / javascript >
< / script >
< style 类型 = text / css >
.modal
{
position:absolute;
z-index:7000px;
top:0px;剩余
:0px;
背景色:灰色;
filter:alpha(opacity = 60);
-moz-opacity:0.6;
不透明度:0.6;
}
< / style < span class =code-keyword>>
< / head >
< body >
< form id = frm runat = 服务器 >
< asp:ScriptManager ID = sm runat = server / >
< asp:按钮 ID = clickbtnn runat = 服务器 文字 = 打开弹出窗口 / >
< asp:Panel ID = Panel1 runat = server BorderColor = AliceBlue BorderWidth = 2px 高度 = 350px
宽度 = 350px BorderStyle = 实体 >
< ; asp:按钮 ID = okbtn runat = server 文本 = ok / >
< asp:按钮 ID = cnlbtn runat = server 文本 = 取消 / >
</ asp:Panel >
< asp:ModalPopupExtender ID < span class =code-keyword> = ModalPopupExtender1 runat = server DropShadow = true
OkControlID = okbtn CancelControlID = cnlbtn BackgroundCssClass = modal TargetControlID = clickbtnn
PopupControlID = Panel1 / >
< / form < span class =code-keyword>>
< / body >
< / html >
用此验证
CSS
<style type="text/css">
.modal
{
position:absolute;
z-index:7000px;
top:0px;
left:0px;
background-color:Gray;
filter:alpha(opacity=60);
-moz-opacity:0.6;
opacity:0.6;
}
</style>
ASP.NET
<body>
<form id="form1" runat="server">
<asp:ScriptManager ID="sm" runat="server" >
<asp:Button ID="clickbtnn" runat="server" Text="click"/>
<asp:Panel ID="Panel1" runat="server" BorderColor="AliceBlue" BorderWidth="2px" Height="350px" Width="350px" BorderStyle="Solid" >
<asp:Button ID="okbtn" runat="server" Text="click"/>
<asp:Button ID="cnlbtn" runat="server" Text="click"/>
<ajaxToolkit:ModalPopupExtender ID="ModalPopupExtender1" runat="server" DropShadow="true" OkControlID="okbtn" CancelControlID="cnlbtn" BackgroundCssClass="modal" TargetControlID="clickbtnn" PopupControlID="Panel1">
</form>
</body>
解决方案
Try this
<html xmlns="http://www.w3.org/1999/xhtml"> <head id="Head1" runat="server"> <title></title> <script type="text/javascript"> </script> <style type="text/css"> .modal { position:absolute; z-index:7000px; top:0px; left:0px; background-color:Gray; filter:alpha(opacity=60); -moz-opacity:0.6; opacity:0.6; } </style> </head> <body> <form id="frm" runat="server"> <asp:ScriptManager ID="sm" runat="server" /> <asp:Button ID="clickbtnn" runat="server" Text="open popup" /> <asp:Panel ID="Panel1" runat="server" BorderColor="AliceBlue" BorderWidth="2px" Height="350px" Width="350px" BorderStyle="Solid"> <asp:Button ID="okbtn" runat="server" Text="ok" /> <asp:Button ID="cnlbtn" runat="server" Text="cancel" /> </asp:Panel> <asp:ModalPopupExtender ID="ModalPopupExtender1" runat="server" DropShadow="true" OkControlID="okbtn" CancelControlID="cnlbtn" BackgroundCssClass="modal" TargetControlID="clickbtnn" PopupControlID="Panel1" /> </form> </body> </html>
verify with this
这篇关于我没有使用asp.net在ajax中获得弹出式MODAL :(的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文