How Do I: Use the ASP.NET AJAX Timer Control?

The AJAX Timer control enables a portion of an ASP.NET web page to be dynamically updated at a regular interval, rather than needing the user to perform an action such as clicking on a button.

Presented by Joe Stagner

Duration: 6 minutes, 21 seconds

Date: 13 February 2007

Watch the video   |   Download the video   |   Get VB code  or  C# code

Video downloads: WMV | Zune | iPod | PSP | MPEG-4 | 3GP

Audio downloads: AAC | WMA | MPEG-4 | MPEG-3 | MPEG-2

Comments : 2

Leave a Comment

m_coomer146 : On March 15, 2008 9:33 AM said:

You can also use the time to redirect after a submission. If a user joins your site they are usually directed to a confirmation page.  On the confirmation page you can set the timer to redirect the user back to your home page or to the login page.

<html dir="ltr" xmlns="www.w3.org/.../xhtml">

<script runat="server">

Protected Sub Timer1_Tick(ByVal sender As Object, ByVal e As System.EventArgs)

Response.Redirect("~/Default.aspx")

End Sub

</script>

<body>

<form id="form1" runat="server">

<h1>Submission successful!</h1>

<p>Thank you for your submission</p>

<p>If you are not redirected in 5 seconds, click <asp:HyperLink runat="server" ID="lnkredirect" NavigateUrl="~/Default.aspx" Text="here"></asp:HyperLink>

</p>

<asp:ScriptManager ID="ScriptManager1" runat="server">

</asp:ScriptManager>

<asp:Timer ID="Timer1" runat="server" EnableViewState="false" Interval="5000" OnTick="Timer1_Tick">

</asp:Timer>

</form>

</body>

</html>

netnorvin : On June 21, 2008 3:25 AM said:

Hi Joe,

      First of it was g8 demo & i luved it.But i need to know one thing.Suppose I am trying to connect to a External  website or URL.How will i able to catch/handle the exception

within my application if the WebSite/ref URL is Down.Most of the time i get a Parse error.

Thank you !!!        

Leave a Comment

You must be logged in to leave a comment. Click here to log in.