![](/img/trans.png)
[英]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.