我正在尝试使用ModalPopupExtender。弹出窗口时,弹出窗口后面的控件没有被禁用,也就是说我仍然可以点击弹出窗口后面的按钮。以下是代码
<body>
<form id="form1" runat="server">
<div>
<asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
</asp:ToolkitScriptManager>
</div>
<div>
<asp:Button ID="Button1" runat="server" Text="Button" />
</div>
<div>
<asp:ModalPopupExtender ID="ModalPopupExtender1" runat="server" DropShadow="true" TargetControlID="Button1"
PopupControlID="Panel1" BackgroundCssClass="backgroundModalPopup" PopupDragHandleControlID="Panel1">
</asp:ModalPopupExtender>
<asp:Panel ID="Panel1" runat="server" BackColor="Aqua" Style="display:none">
This is modal pop up extender : hi
<asp:Button ID="Button2" runat="server" Text="Button" />
</asp:Panel>
</div>
</form>
</body>
任何人都可以告诉我为什么我无法禁用其余页面的原因?感谢。
答案 0 :(得分:0)
最后,我得到了解决方案。问题是在aspx页面中没有引用css(虽然我加入了代码来链接我的css文件)。但是,当我通过将css文件放到Visual Studio中的aspx页面上将css文件添加到aspx页面时,它已经工作了,当我通过代码引用它时,它对我来说不起作用。真奇怪!!!
感谢。