obout grid control is not working when running under Umbraco
I’m getting an error when trying to bind an obout grid under Umbraco
Does anyone have a fix for this or do you know what can I do to resolve it ?
I’ve just downloaded your latest obout version from January 5th, 2011 but still get this error,
(it works fine if I run it on an external page – not under Umbraco)
Please let me know if you have any suggestion.
Server Error in '/' Application.
The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).
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. <% ... %>).
Stack Trace
at System.Web.UI.ControlCollection.Add(Control child) at Obout.Grid.Grid.CreateReferencesForAppearanceResources() at Obout.Grid.Grid.CreateChildControls(IEnumerable dataSource, Boolean dataBinding) at System.Web.UI.WebControls.CompositeDataBoundControl.PerformDataBinding(IEnumerable data) at Obout.Grid.Grid.ExecuteRebinding(Boolean forced) at Obout.Grid.Grid.RaisePostDataChangedEvent() at System.Web.UI.Page.RaiseChangedEvents() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
obout grid control is not working when running under Umbraco
I’m getting an error when trying to bind an obout grid under Umbraco
Does anyone have a fix for this or do you know what can I do to resolve it ?
I’ve just downloaded your latest obout version from January 5th, 2011 but still get this error,
(it works fine if I run it on an external page – not under Umbraco)
Please let me know if you have any suggestion.
Server Error in '/' Application.
The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).
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. <% ... %>).
Stack Trace
at System.Web.UI.ControlCollection.Add(Control child)
at Obout.Grid.Grid.CreateReferencesForAppearanceResources()
at Obout.Grid.Grid.CreateChildControls(IEnumerable dataSource, Boolean dataBinding)
at System.Web.UI.WebControls.CompositeDataBoundControl.PerformDataBinding(IEnumerable data)
at Obout.Grid.Grid.ExecuteRebinding(Boolean forced)
at Obout.Grid.Grid.RaisePostDataChangedEvent()
at System.Web.UI.Page.RaiseChangedEvents()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
Are you adding it via a macro? If so you can't have inline code in the ASCX file from what I recall.
I also tried loading the user control directly (with no macro) but I get the same results.
Solved thanks to Chris from obout.
We had a head tag with runat="server" that caused it
<head runat="server"> changed to just <head>
I think there is a dynamic script injection somewhere, I'll try using <%# instead of <%=
is working on a reply...