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
2010-10-17 10:46:48
thank you for your reply. will it work at formload or which event should i write this?
Mohan Sharma
2010-10-17 10:51:51
Can the downvote please explain?
Oded
2010-10-17 10:51:56
@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
2010-10-17 10:54:29
OK THANK YOU VERY MUCH
Mohan Sharma
2010-10-17 10:56:19