2012-05-28 80 views
-1

當我將RadScheduler添加到我的項目時出現此錯誤。 我使用Visual Studio 2010和2011的RadControls Q2 感謝您的幫助控件集合不能被修改,因爲控件包含代碼塊(即<% ... %>)。 Telerik應用程序

Controls集合不能修改,因爲該控件包含代碼塊(即<%...%>)。

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.Web.HttpException: The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>). 

Source Error: 

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. 

Stack Trace: 


[HttpException (0x80004005): The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).] 
    System.Web.UI.ControlCollection.Add(Control child) +8828175 
    Telerik.Web.SkinRegistrar.RegisterCssReference(Page _page, Control _control, String _url) +486 

    [HttpException (0x80004005): Please, see whether wrapping the code block, generating the exception, within RadCodeBlock resolves the error.] 
     Telerik.Web.SkinRegistrar.RegisterCssReference(Page _page, Control _control, String _url) +557 
     Telerik.Web.SkinRegistrar.RegisterCssReferences(ISkinnableControl _control) +1563 
     Telerik.Web.UI.RadDataBoundControl.RegisterCssReferences() +74 
     Telerik.Web.UI.RadDataBoundControl.ControlPreRender() +50 
     Telerik.Web.UI.RadDataBoundControl.OnPreRender(EventArgs e) +47 
     Telerik.Web.UI.RadScheduler.OnPreRender(EventArgs e) +131 
     System.Web.UI.Control.PreRenderRecursiveInternal() +103 
     System.Web.UI.Control.PreRenderRecursiveInternal() +175 
     System.Web.UI.Control.PreRenderRecursiveInternal() +175 
     System.Web.UI.Control.PreRenderRecursiveInternal() +175 
     System.Web.UI.Control.PreRenderRecursiveInternal() +175 
     System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2496 

回答

0

當存在<%%>塊時,您無法修改控制樹。請參閱this幫助主題了解更多信息。

相關問題