use*_*175 2 c# asp.net ajax ajaxcontroltoolkit
以下代码位于Login.aspx文件中。以前,代码运行非常平稳。但是,添加ajax ModalPopup扩展程序后,会发生此错误。
当用户单击超链接“忘记密码”时,我试图创建一个弹出窗口。
以前,我曾在另一个aspx文件中尝试过ajax日历和Balloonpopup,并且效果很好。仅modalpopup扩展程序有错误。
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Run Code Online (Sandbox Code Playgroud)
堆栈跟踪:
[InvalidOperationException: Extender controls may not be registered before PreRender.]
System.Web.UI.ScriptControlManager.RegisterExtenderControl(TExtenderControl extenderControl, Control targetControl) +442081
Run Code Online (Sandbox Code Playgroud)
这是Login.aspx文件中的代码:
<asp:ScriptManager ID="ScriptManager2" runat="server"> </asp:ScriptManager>
<asp:HyperLink ID="HyperLink2" runat="server">Forget Password</asp:HyperLink>
<asp:ModalPopupExtender ID="HyperLink2_ModalPopupExtender" runat="server"
Enabled="True" TargetControlID="HyperLink2"
PopupControlID="Panel1">
</asp:ModalPopupExtender>
<asp:Panel ID="Panel1" runat="server"> Show pop Up here! </asp:Panel>
Run Code Online (Sandbox Code Playgroud)
我的代码出了什么问题?我将其与互联网上的示例代码进行了比较,这非常相似。
| 归档时间: |
|
| 查看次数: |
3926 次 |
| 最近记录: |