I am using AjaxControlToolkit in my master page. Everything was working fine. 3/4 days back i found that i cannot run my project it's showing following error
Extender 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: Extender 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: Extender controls may not be registered before PreRender.] System.Web.UI.ScriptControlManager.RegisterExtenderControl(TExtenderControl extenderControl, Control targetControl) +432673 System.Web.UI.ScriptManager.RegisterExtenderControl(TExtenderControl extenderControl, Control targetControl) +95 System.Web.UI.ExtenderControl.RegisterWithScriptManager() +176 System.Web.UI.ExtenderControl.OnPreRender(EventArgs e) +19 AjaxControlToolkit.ExtenderControlBase.OnPreRender(EventArgs e) in C:\Users\Stephen\Documents\Repos\Superexpert\AjaxControlToolkit\Server\AjaxControlToolkit\ExtenderBase\ExtenderControlBase.cs:365 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 |
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1
I have googled a lot and tried all possible solutions suggested by different forums. Nothing worked for me. What can i check now.
base.OnPreRender(e); //already tried
ScriptManager scriptManager = ScriptManager.GetCurrent(this.Page); //dynamic script manager already tried
For more information i am not using any custom web controls.
Please help me to solve this problem.