Quantcast
Channel: AjaxControlToolkit Work Item Rss Feed
Viewing all articles
Browse latest Browse all 4356

Created Unassigned: Timer and Script Combining w/ ToolkitScriptManager [27639]

$
0
0
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?

Viewing all articles
Browse latest Browse all 4356

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>