Timers in application web programming

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Stephen Inkpen

    #1

    Timers in application web programming

    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
  • Ken Cox [Microsoft MVP]

    #2
    Re: Timers in application web programming

    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.co m/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."


    "Stephen Inkpen" <sinkpen@cs.mun .ca> wrote in message
    news:76c844aa.0 307151750.5f148 6b6@posting.goo gle.com...
    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


    Comment

    Working...