Automatic Refresh of page (using a timer and .reload) causes messagebox.

Discussion in 'ASP .Net' started by UJ, Aug 12, 2005.

  1. UJ

    UJ Guest

    I have a page with code in it to automatically refresh the page every 30
    seconds. Works great. But if I do anything on the page (which resets the
    timer) and then it times out to refresh, I get the 'The page cannot be
    refreshed without resending the information. Click Retry to send the
    information again, or click Cancel to return to the page that you were
    trying to view.'

    Anybody know of any way to stop that message from coming up?

    Like I said - if you don't do anything - it works fine. Make any kind of
    change to the page and it produces this error.

    TIA.
    UJ, Aug 12, 2005
    #1
    1. Advertising

  2. The message comes as a result of Refreshing a page that was returned as the
    result of a POST Request. IOW, probably as a result of a PostBack. What I
    would do is, if the Page is Posted Back, do a Response.Redirect to return
    the Page to the client. Of course, you will have to figure out how to
    restore the state to the Page in a different way. Session and QueryString
    come to mind offhand.

    --
    HTH,

    Kevin Spencer
    Microsoft MVP
    ..Net Developer
    Everybody picks their nose,
    But some people are better at hiding it.

    "UJ" <> wrote in message
    news:...
    >I have a page with code in it to automatically refresh the page every 30
    >seconds. Works great. But if I do anything on the page (which resets the
    >timer) and then it times out to refresh, I get the 'The page cannot be
    >refreshed without resending the information. Click Retry to send the
    >information again, or click Cancel to return to the page that you were
    >trying to view.'
    >
    > Anybody know of any way to stop that message from coming up?
    >
    > Like I said - if you don't do anything - it works fine. Make any kind of
    > change to the page and it produces this error.
    >
    > TIA.
    >
    Kevin Spencer, Aug 12, 2005
    #2
    1. Advertising

  3. UJ

    Lucas Tam Guest

    "UJ" <> wrote in news:efgBc80nFHA.1148
    @TK2MSFTNGP12.phx.gbl:

    > I have a page with code in it to automatically refresh the page every 30
    > seconds. Works great. But if I do anything on the page (which resets the
    > timer) and then it times out to refresh, I get the 'The page cannot be
    > refreshed without resending the information. Click Retry to send the
    > information again, or click Cancel to return to the page that you were
    > trying to view.'
    >
    > Anybody know of any way to stop that message from coming up?


    Perhaps consider using Javascript remoting to update the page instead.

    If you're using ASP.NET 2.0, it's called Client Side Postbacks.

    Otherwise take a look at:

    http://www.ashleyit.com/rs/
    http://www.thycotic.com/dotnet_remotescripting.html

    --
    Lucas Tam ()
    Please delete "REMOVE" from the e-mail address when replying.
    http://members.ebay.com/aboutme/coolspot18/
    Lucas Tam, Aug 12, 2005
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. brian lanning
    Replies:
    0
    Views:
    573
    brian lanning
    Jul 29, 2003
  2. Shannon Yoder

    Automatic refresh/reload

    Shannon Yoder, Sep 13, 2003, in forum: HTML
    Replies:
    2
    Views:
    616
  3. Joshua Beall
    Replies:
    26
    Views:
    219,867
    AndreiKaa
    Jun 29, 2007
  4. Luai24
    Replies:
    0
    Views:
    628
    Luai24
    May 6, 2009
  5. VT
    Replies:
    8
    Views:
    1,673
    Paul E. Schoen
    Oct 14, 2010
Loading...

Share This Page