Script controls may not be registered before PreRender.
New DiscussionHi,
In my page I have browse button to select the input file.
Based on input file content the webdatagrid will be loaded.
Webdatagrid is loading successfully if I run from my Visual studio and inside the Development server browser.
If I use the same development server URL in my client machine/laptop I am not getting the grid, I got the following exception.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Exception = InvalidOperationException
Message = Script controls may not be registered before PreRender.
Source = System.Web.Extensions
StackTrace = at System.Web.UI.ScriptControlManager.RegisterScriptControl[TScriptControl](TScriptControl scriptControl)
at Infragistics.Web.UI.Framework.Data.FlatDataBoundControl.OnPreRender(EventArgs e)
at Infragistics.Web.UI.GridControls.WebDataGrid.OnPreRender(EventArgs e)
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Control.AddedControl(Control control, Int32 index)
at CSM_MES.SPMet.PostBackControls()
TargetSite = Void RegisterScriptControl[TScriptControl](TScriptControl)
Called from
Page:
Method: PostBackControls
Line: 0
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
FYI, I am using scriptmanager in my page.
The page is working good if I use the URL inside the server browser, but if I use the same URL in client machine/laptop the page is working but the webdatagrid is not loaded and exception bounces.
Could you please help me to resolve this issue.
Thanks,
Ravi