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:
I have no clue if this is a bug or not.
Maybe somebody can explain it.
There seems to be a bug in the latest AJAX Control Toolkit - I have just come across this error myself - It seems the only option is to downgrade to a previous version.
https://ajaxcontroltoolkit.codeplex.com/workitem/27639 and http://forums.asp.net/t/1962717.aspx?Timer+and+Script+Combining+w+ToolkitScriptManager
to fix the current issue i am having to run in debug mode until i can downgrade and test.
This worked for me.
Using the ToolScriptManager with CombineScripts="false"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With