Hi Guys,
I've read through the other forum threads and have had no luck, I'm working on a ASP.net (vb) web appliaction and to the master page i have added a timer control with the script manager at the top, but i still continue to recived the error message :
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) +432521 System.Web.UI.Timer.OnPreRender(EventArgs e) +76 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 |
the aspx.
<body id="mstrBody" runat="server"><form id="fMain" runat="server"><div><asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager><asp:Timer ID="timer1" runat="server" Interval="1000" OnTick="timer1_tick"></asp:Timer></div>
the codebehind
Sub timer1_tick() Handles timer1.Tick
GetWebinar()
End Sub
Thank you.