title: Script controls may not be registered before PreRender. when using timer control
body: <p>I'm a  newbie to ASP.net (vb), and i'm working with the timer controls. I've once again researched the answer to this and done as said (overloading prerender method). My problem is I have a master page which i've added a timer control, in order to update a count down field, on going to the sites index page i keep getting the error : "Script controls may not be registered before PreRender." The timer works well on other pages except the index page.</p>
  
  <pre><code>&lt;form id="fMain" runat="server"&gt;
      &lt;div&gt;
          &lt;asp:ScriptManager ID="ScriptManager1" runat="server"&gt;&lt;/asp:ScriptManager&gt;
          &lt;asp:Timer ID="timer1" runat="server" Interval="1000" OnTick="timer1_tick"&gt;&lt;/asp:Timer&gt;&lt;/div&gt;
       &lt;div&gt;
   &lt;asp:UpdatePanel id="updPnl" runat="server" UpdateMode="Conditional"&gt;
       &lt;ContentTemplate&gt;
        &lt;asp:Literal ID="litTimer" runat="server"&gt;&lt;/asp:Literal&gt;
                          &lt;/ContentTemplate&gt;
                          &lt;Triggers&gt;
                              &lt;asp:AsyncPostBackTrigger ControlID="timer1" EventName ="tick" /&gt;
                           &lt;/Triggers&gt;
                      &lt;/asp:UpdatePanel&gt;
                  &lt;/div&gt;
  </code></pre>
  
  <p>The Codebehind:</p>
  
  <pre><code>Sub timer1_tick() Handles timer1.Tick
         ltr1.text = "test"
  
  End Sub`
  </code></pre>
  
  <p>Thank you in advance. </p>