Ajax控件错误ExtenderControlBase.cs [英] Ajax control error ExtenderControlBase.cs
本文介绍了Ajax控件错误ExtenderControlBase.cs的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
您好,
我在另一个aspx页面的iframe中运行aspx页面。点击按钮后,此iframe将显示为灯箱(弹出窗口)。在加载iframe时我得到了ajax汇编错误
C:\ Users \ Stephen \Documents \ Releases \ AjaxControlToolkit50401 \AjaxControlToolkitPrime\Server\AjaxControlToolkit \ExtenderBase \ExtenderControlBase.cs
如果我点击继续显示以下信息iframe作为例外
无法修改Controls集合,因为控件包含代码块(即<%...%>)
任何人都可以帮助我..
谢谢
解决方案
这通常意味着您在页面标题或母版页中有<%...%>
块。有两种方法可以解决此异常:
首先:
从页面的标题部分删除JavaScript并将其添加到页面正文并运行你的应用程序它将适合你。
第二:
用替换代码块<%#
而不是<%=
。
您还可以看到:如何修复:无法修改Controls集合,因为控件包含代码块(即<%...%>)。[ ^ ]
--Amit
Hello,
I am running aspx page in a iframe which is in another aspx page. This iframe will be displayed as a lightbox(popup) on click of a button. While loading of iframe i am getting ajax assembly error
C:\Users\Stephen\Documents\Releases\AjaxControlToolkit50401\AjaxControlToolkitPrime\Server\AjaxControlToolkit\ExtenderBase\ExtenderControlBase.cs
If i click continue its displaying below message in iframe as a exception
The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>)
Can anyone help me..
Thanks
解决方案
This usually means you have<%...%>
blocks in the header of a page or your master page. There are two ways to solve this exception:
First:
Remove JavaScript from the header section of page and add it to body of the page and run your application it will work for you.
Second:
Replace the code block with<%#
instead of<%=
.
You can also see : How to fix : The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).[^]
--Amit
这篇关于Ajax控件错误ExtenderControlBase.cs的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文