PC Review


Reply
Thread Tools Rate Thread

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

 
 
UJ
Guest
Posts: n/a
 
      12th Aug 2005
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.


 
Reply With Quote
 
 
 
 
Kevin Spencer
Guest
Posts: n/a
 
      12th Aug 2005
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>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.
>



 
Reply With Quote
 
Lucas Tam
Guest
Posts: n/a
 
      12th Aug 2005
"UJ" <(E-Mail Removed)> 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 ((E-Mail Removed))
Please delete "REMOVE" from the e-mail address when replying.
http://members.ebay.com/aboutme/coolspot18/
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
automatic page refresh dj001 Microsoft Frontpage 0 2nd May 2008 11:40 AM
Refresh (reload) just data [not whole page] =?ISO-8859-2?Q?Damjan_Vengu=B9t?= Microsoft ASP .NET 3 19th Jul 2004 03:46 PM
Re: Automatic refresh page numbers (X of X) Jay Freedman Microsoft Word New Users 0 13th Dec 2003 01:19 AM
Automatic Home Page Reload MB Windows XP Internet Explorer 0 8th Sep 2003 01:07 PM
reload and refresh a page in MSIE Tom Hanley Microsoft Frontpage 8 19th Aug 2003 12:55 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:05 PM.