I've found a bug with how script combining works with the Timer control. Although, this is so basic that if anybody can see if I'm doing something wrong, please let me know. I want to use a Timer control with a ToolkitScriptManager. When script combining is turned off, everything works fine. But by changing the ToolkitScriptManager.CombineScripts property to true, the Timer control never fires the Tick event. If I debug the javascript, I see an error message saying "undefined is not a function". The code is very simple:
```
<%@ Page Language="VB" %>
<%@ Register TagPrefix="ajax" Namespace="AjaxControlToolkit" Assembly="AjaxControlToolkit" %>
<script runat="server">
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()
End Sub
</script>
<html>
<body>
<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">
<ContentTemplate>
<asp:Label runat="server" ID="lblTest" Text="1" />
</ContentTemplate>
</asp:UpdatePanel>
</form>
</body>
</html>
```
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?
Comments: If you put the site into debug mode, the code works fine. That's because even if you turn script combining on, it doesn't function in debug mode. If you put the code into release mode and then turn on script combining, the Timer never ticks. I've put the attached test site together and using the Dec 2013 release of the AJAX Control Toolkit, this doesn't work. Script combining seems to work with the Control Toolkit's controls, but not the Timer control. I'd love to get this fixed so I could use script combining on my product sites.
```
<%@ Page Language="VB" %>
<%@ Register TagPrefix="ajax" Namespace="AjaxControlToolkit" Assembly="AjaxControlToolkit" %>
<script runat="server">
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()
End Sub
</script>
<html>
<body>
<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">
<ContentTemplate>
<asp:Label runat="server" ID="lblTest" Text="1" />
</ContentTemplate>
</asp:UpdatePanel>
</form>
</body>
</html>
```
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?
Comments: If you put the site into debug mode, the code works fine. That's because even if you turn script combining on, it doesn't function in debug mode. If you put the code into release mode and then turn on script combining, the Timer never ticks. I've put the attached test site together and using the Dec 2013 release of the AJAX Control Toolkit, this doesn't work. Script combining seems to work with the Control Toolkit's controls, but not the Timer control. I'd love to get this fixed so I could use script combining on my product sites.