Click here to Skip to main content
15,885,741 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
HI All,

I am using master page and adding a script manager and when i'm adding update panel in other pages it is working fine, but the problem arises when we are adding UpdateProgress.
Here is full description. Please help me out of this problem

Script controls may not be registered before PreRender.
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.InvalidOperationException: Script controls may not be registered before PreRender.

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:



[InvalidOperationException: Script controls may not be registered before PreRender.]
System.Web.UI.ScriptControlManager.RegisterScriptControl(TScriptControl scriptControl) +394485
System.Web.UI.UpdateProgress.OnPreRender(EventArgs e) +73
System.Web.UI.Control.PreRenderRecursiveInternal() +83
System.Web.UI.Control.PreRenderRecursiveInternal() +155
System.Web.UI.Control.PreRenderRecursiveInternal() +155
System.Web.UI.Control.PreRenderRecursiveInternal() +155
System.Web.UI.Control.PreRenderRecursiveInternal() +155
System.Web.UI.Control.PreRenderRecursiveInternal() +155
System.Web.UI.Control.PreRenderRecursiveInternal() +155
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +974
Posted

add below statement to OnPrerender Method of page
base.OnPreRender(e);
 
Share this answer
 
If you are using Master Page, place the ScriptManager control on the master page if you have placed it on page.

-KR
 
Share this answer
 
Comments
devlop 3-Mar-14 3:13am    
Yes placed it in master page but still same error

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900