tags:

views:

32

answers:

1

Hi everybody, Suppose i want to display Hello World Message. How to call this function every five minutes?

+1  A: 

On the client, you can use setTimeout with Javascript.

On the server, you can use one of the Timer classes. System.Threading.Timer or System.Timers.Timer.

There is also an ajax timer control that will probably be best suited to your needs. Read the details here.

Oded
thank you for your reply. will it work at formload or which event should i write this?
Mohan Sharma
Can the downvote please explain?
Oded
@Mohan Sharma - You can use them in the form load event, however to communicate with the browser, it will cause the page to reload every time. Not very efficient. Look at how to do this in Javascript, perhaps with AJAX.
Oded
OK THANK YOU VERY MUCH
Mohan Sharma