[英]I'm using datejs in an ascx, but it's causing problems for my ajax calendar extender
[英]AJAX SciptManager causing problems
我试图让一个ScriptManager在.NET 3.5中工作,但是获得了一个scriptmanager例外。 我刚从页面中删除了所有UpdatePanel,并将所有内容重构为UserControls,因此页面不再像VB5应用程序那样编写。 ToolkitScriptManager位于主页面上,我在有问题的页面上尝试使用和不使用ScriptManagerProxy。
我得到一个堆栈跟踪,出现以下错误:
The Controls collection cannot be modified because the control contains code blocks (ie <% ... %>).
堆栈跟踪:
[HttpException (0x80004005): The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).]
System.Web.UI.ControlCollection.Add(Control child) +8690071
AjaxControlToolkit.ScriptObjectBuilder.RegisterCssReferences(Control control) in d:\hg\act\Server\AjaxControlToolkit\ExtenderBase\ScriptObjectBuilder.cs:323
AjaxControlToolkit.ExtenderControlBase.OnLoad(EventArgs e) in d:\hg\act\Server\AjaxControlToolkit\ExtenderBase\ExtenderControlBase.cs:305
System.Web.UI.Control.LoadRecursive() +50
System.Web.UI.Control.LoadRecursive() +141
System.Web.UI.Control.LoadRecursive() +141
System.Web.UI.Control.LoadRecursive() +141
System.Web.UI.Control.LoadRecursive() +141
System.Web.UI.Control.LoadRecursive() +141
System.Web.UI.Control.LoadRecursive() +141
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627
我在代码中看不到任何<%=标签,现在我变得绝望了。 我将如何跟踪错误的来源。 任何帮助表示赞赏。
除了删除和<%= ..%>
,请确保您没有Response.Write
。在代码隐藏中写入任何内容。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.