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

Please install Silverlight or click download to watch video locally.

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    Video   |   Download    Video   |   VB Code    C# Code

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

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

Comments : 9

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">

Submission successful!

Thank you for your submission

If you are not redirected in 5 seconds, click

</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 !!!        

cv_vikram : On August 06, 2008 1:54 PM said:

Very good tutorial...thanks

Karina Northen : On September 04, 2008 8:31 AM said:

I can’t understand why in  AJAXEnabledWeb Site  not working this code?

 Dim PictureNumber As Integer

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

       Select Case PictureNumber

           Case 1

               Image.ImageUrl = "~/images/karina_1.jpg"

           Case 2

               Image.ImageUrl = "~/images/karina_2.jpg"

           Case 3

               Image.ImageUrl = "~/images/karina_3.jpg"

           Case 4

               Image.ImageUrl = "~/images/karina_4.jpg"

           Case 5

               Image.ImageUrl = "~/images/karina_5.jpg"

           Case 6

               Image.ImageUrl = "~/images/karina_6.jpg"

       End Select

       PictureNumber += 1

       If PictureNumber > 6 Then

           PictureNumber = 1

       End If

   End Sub

Haw get timer not to stop here after 6 ticks?

   Protected Sub Timer2_Tick(ByVal sender As Object, ByVal e As System.EventArgs) Handles Timer2.Tick

       Dim n As Integer = New Random().Next(1, 6)

       Image6.ImageUrl = "~/images/karina_" + n.ToString + ".jpg"

       Image6.Visible = True

   End Sub

Please help …

Karina.

e-mail: karina.northen@talktalk.net

djibril_chimere_DIAW : On December 30, 2008 6:21 AM said:

Thanks! Jërëjëf!

alfredo : On January 24, 2009 7:43 PM said:

Thanks Joe, great technique and nice comments by the audience. I take it a dynamic cache table may be used in a similar situation for a different application.

jemmeli : On April 04, 2009 4:45 AM said:

please is it possible to create the same work as the video but the code created dynamically by the vb.net (such as the triggers and the images and link buttons are all created dynamically) ?

reza rahgozar : On August 15, 2009 6:12 AM said:

Hi

Can I Use This Code For Repeater And Bind From DATABNAK

Thanks A lot

ulhass : On October 23, 2009 11:53 AM said:

Hi,

Nice article!

how to use progress bar in the same example?

Thank you.

Leave a Comment

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

Microsoft Communities