Timers in application web programming

S

Stephen Inkpen

I'm trying to get my page to automatically update a data table every
10 seconds but using the System.Timer object doesn't seem to work.

Anyone know how to get a web page to automatically get new data from
the server on a regular interval?

Thanks,

Stephen Inkpen
 
K

Ken Cox [Microsoft MVP]

You need to output some regular HTML to force the open browser to refresh the
page:

<HTML>
<HEAD>
<META HTTP-EQUIV="refresh" content="2;URL=http://www.yoursite.com/newpage.htm">
<TITLE>Page has moved</TITLE>
</HEAD>
<BODY>
whatever you want to write
</BODY>
</HTML>


<META HTTP-EQUIV="refresh" CONTENT="n; URL=http://foo.bar/">

"This is a so-called "meta refresh", which on certain browsers causes the
document mentioned in the URL to be loaded after n seconds. This can be used
for slide shows or for often-changing information, but has some drawbacks. In
particular, if you use a value of zero seconds, the user can no longer go
"Back" with his back button. He will be transferred to the specified URL, and
when he presses "back" there, he will go back to the document with the refresh,
which immediately redirects him to the document he tried to get away from."


I'm trying to get my page to automatically update a data table every
10 seconds but using the System.Timer object doesn't seem to work.

Anyone know how to get a web page to automatically get new data from
the server on a regular interval?

Thanks,

Stephen Inkpen
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top