Last post Jan 24, 2014 02:26 AM by valuja
Jan 21, 2014 11:44 AM|Bryan Ponnwitz|LINK
I think I've found a bug with how script combining works with the Timer control. Although, this is so basic that I'm wondering if anybody can see if I'm doing something wrong. I want to use a Timer control with a ToolkitScriptManager. When script combining
is very simple:
<%@ Page Language="VB" %>
<%@ Register TagPrefix="ajax" Namespace="AjaxControlToolkit" Assembly="AjaxControlToolkit" %>
Protected Sub tmrTest_Tick(Sender As Object, Args As EventArgs)
Dim objLabel As Label = CType(FindControl("lblTest"), Label)
objLabel.Text = (CInt(objLabel.Text) + 1).ToString()
<form runat="server" id="frmTest">
<ajax:ToolkitScriptManager runat="server" id="scpManager" EnablePartialRendering="True" CombineScripts="True" />
<asp:Timer runat="server" ID="tmrTest" Interval="2000" OnTick="tmrTest_Tick" />
<asp:UpdatePanel runat="server" id="upnlTest">
<asp:Label runat="server" ID="lblTest" Text="1" />
If you change the CombineScripts property to False, it works fine. When the value is True, it fails. I've made sure the CombineScriptsHandler.axd handler is registered in my web.config, but this just doesn't work. Can anybody give me a little guidance
on this, or is this a known issue?
Jan 22, 2014 04:50 AM|Fuxiang Zhang - MSFT|LINK
Thank you post the issue to our forum.
I test your code and it works fine to me. There is a similar bug you can refer to.
"CombineScripts=true compatibility problems in IE" with solutions below.
"undefined is not a function"
For the error message, I suggest you try remove Microsoft.AspNet.ScriptManager.MSAjax.dll from bin folder on the server if it exists.
More information, please check below link.
Hope this helps, thanks.
Jan 22, 2014 10:44 PM|chetan.sarode|LINK
Jan 23, 2014 08:47 AM|Bryan Ponnwitz|LINK
To make the code not work, you need to take the site out of debug mode. When the site is in debug mode, it works just fine because script combining doesn't function in debug mode. However, in release mode, the code does not work. I've
been able to get the code to fail by using the following web.config:
<compilation debug="false" strict="true" explicit="true" targetFramework="4.0" />
When debug="false" in the web.config and CombineScripts="True" for the ToolkitScriptManager, the timer doesn't tick. Are you able to get this to work using this configuration?
Jan 23, 2014 08:48 AM|Bryan Ponnwitz|LINK
Hitting Ctrl-F5 doesn't help the problem. I've been able to successfully reproduce this issue using the example previously uploaded in this thread.
Jan 23, 2014 10:02 AM|valuja|LINK
I can confirm that this is a bug, the problem is that when the combine script is active the script resources are not being loaded in the correct order, the same happens if you remove the CombineScript attribute but uses the ScriptMode="Release".
Jan 23, 2014 11:00 AM|Bryan Ponnwitz|LINK
Thanks, do you know if it's an issue which is being worked on by the AJAX Control Toolkit group? Script combining is such a useful tool; it's a shame not to be able to use it on my websites! I entered an issue on CodePlex, but who knows if anybody will
see it who can fix the issue.
Jan 24, 2014 02:26 AM|valuja|LINK
I don't know if they have checked into this issue yet, there seems to be quite a lot of issues with the latest release so I think it will take some time before this issue is fixed.