【发布时间】:2018-04-23 06:33:27
【问题描述】:
我需要在页面加载时显示弹出窗口。我使用了 ModelPopupExtender。它确实显示在它的 TargetControlID 单击上,但没有显示在从后面的代码加载的页面上。 我在堆栈上检查了许多解决方案,但没有一个对我有用。
protected void Page_Load(object sender, System.EventArgs e)
{
this.mpOTP.Show();
}
<asp:Button ID="activateMpOtp" runat="server" Text="Open" ClientIDMode="Static"/>
<asp:ModalPopupExtender ID="mpOTP" runat="server" BackgroundCssClass="popup-overlay" PopupControlID="pnlOTP" CancelControlID="closeOTP" TargetControlID="activateMpOtp"></asp:ModalPopupExtender>
<asp:Panel ID="pnlOTP" runat="server" CssClass="popup-dialogue">
</asp:Panel>
【问题讨论】:
-
你在使用 AJAXControlToolKit 吗?
-
@Sunil 是的。从 nuget 管理器下载
-
检查我的答案。
标签: c# asp.net ajax modalpopupextender