我试图让 ScriptManager 在 .NET 3.5 中工作,但得到一个 scriptmanager 异常。我刚刚从页面中删除了所有的 UpdatePanel,并将所有内容重构为 UserControls,因此页面不再像 VB5 应用程序那样编写。ToolkitScriptManager 在母版页上,我尝试过在违规页面上使用和不使用 ScriptManagerProxy。
我收到带有以下错误的堆栈跟踪:
The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).
堆栈跟踪:
[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
我在代码中看不到任何 <%= 标记,我现在变得绝望。我将如何追踪错误的来源。任何帮助表示赞赏。