I am using the ajax timer control inside an update panel.
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:Timer ID="Timer1" runat="server" Interval="1000" OnTick="Timer1_Tick"></asp:Timer>
<asp:Label ID="Label1" runat="server" Text=""></asp:Label>
</ContentTemplate>
</asp:UpdatePanel>
The timer should update the label every second with the current datetime.
protected void Timer1_Tick(object sender, EventArgs e)
{
Label1.Text = DateTime.Now.ToString();
}
Everything works fine in debug mode but when I run the site without debugger (CTRL+F5) or if I deploy the site to my server the timer does not tick.
But when I add "debug=true" to the web.config everything works fine. Even on my server.
<compilation targetFramework="4.0" debug="true">
Internet Explorer throws the exception "Object doesn't support this action" in ScriptResource.axd.
How can I solve this issue?
EDIT: I think I have solved it.
I don't know why but two things can solve this issue:
- Using a ScriptManager instead of a ToolScriptManager
- Using the ToolScriptManager with CombineScripts="false"
I have no clue if this is a bug or not.
Maybe somebody can explain it.