加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 编程开发 > asp.Net > 正文

asp.net – 什么原因导致“无法注销UpdatePanel”错误?

发布时间:2020-12-15 22:38:55 所属栏目:asp.Net 来源:网络整理
导读:我有一个包含UpdatePanel的UserControl.当我把它放在页面上时,会引发以下错误: Cannot unregister UpdatePanel with ID ‘ReviewContentUpdatePanel’ since it was not registered with the ScriptManager. This might occur if the UpdatePanel was remov
我有一个包含UpdatePanel的UserControl.当我把它放在页面上时,会引发以下错误:

Cannot unregister UpdatePanel with ID
‘ReviewContentUpdatePanel’ since it
was not registered with the
ScriptManager. This might occur if the
UpdatePanel was removed from the
control tree and later added again,
which is not supported. Parameter
name: updatePanel

ReviewContentUpdatePanel是更新面板&它不会被删除或添加在代码中,它存在于aspx页面中,不会被删除.以前有没有人遇到过?

解决方法

当使用 Clear method清除UpdatePanel驻留的Controls集合时,或使用 Remove method删除特定UpdatePanel时,会发生此错误.

这些方法的触发器可能是CreateChildControls method的实现,包含UpdatePanel的控件.通常,您在此方法的顶部调用Controls.Clear(),如果重复调用此方法,则以干净的格式开始.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读