I've got a .NET 2.0 ASP.Net web app with a master page and I'm trying to add Ajax features to it. I've added a RadScriptManager to the master page and it runs. As soon as I add a RadAjaxManager or a RadAjaxPanel to the master page, it dies upon start up with the following error:
The same thing happens if I add either of the two to the default.aspx page or a .ascx control that is used on the default.aspx page.
What am I doing wrong?
| 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) +236 |
| System.Web.UI.ScriptManager.RegisterScriptControl(TScriptControl scriptControl) +99 |
| Telerik.Web.UI.RadAjaxManager.OnPreRender(EventArgs e) +97 |
| System.Web.UI.Control.PreRenderRecursiveInternal() +86 |
| System.Web.UI.Control.PreRenderRecursiveInternal() +170 |
| System.Web.UI.Control.PreRenderRecursiveInternal() +170 |
| System.Web.UI.Control.PreRenderRecursiveInternal() +170 |
| System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2041 |
| -------------------------------------------------------------------------------- |
| Version Information: Microsoft .NET Framework Version:2.0.50727.1873; ASP.NET Version:2.0.50727.1433 |
The same thing happens if I add either of the two to the default.aspx page or a .ascx control that is used on the default.aspx page.
What am I doing wrong?