Thursday, August 13, 2009

Start/Stop ASP.NET 2.0 AJAX 1.0 Timer control using javascript

There is a way to start/stop ASP.NET 2.0 AJAX 1.0 Timer control from client side.

There are 2 methods _startTimer() and _stopTimer() which is not documented anywhere.

Here is the sample javascript functions on how to use these 2 methods:

function startTimer()
{
var timer = $find("<%=ajaxTimer.ClientID%>")
timer._startTimer();
}
function stopTimer()
{
var timer = $find("<%=ajaxTimer.ClientID%>")
timer._stopTimer();
}

where ajaxTimer is the Timer control.
Digg Google Bookmarks reddit Mixx StumbleUpon Technorati Yahoo! Buzz DesignFloat Delicious BlinkList Furl

0 comments : on " Start/Stop ASP.NET 2.0 AJAX 1.0 Timer control using javascript "