Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Refresh button.

Reply
Thread Tools

Refresh button.

 
 
John Blair
Guest
Posts: n/a
 
      09-06-2005
Hi,

During a postback is there anyway of knowing for sure if it was due to the
user hitting the Refresh button?

Thanks.


 
Reply With Quote
 
 
 
 
Peter Rilling
Guest
Posts: n/a
 
      09-06-2005
You will probably need to handle this yourself like keep track of when
something has been posted.

What I usually do is to do a Redirect back to the page so that there is no
form data to send back when refreshing the page.

"John Blair" <(E-Mail Removed)> wrote in message
news:K2nTe.6588$(E-Mail Removed)...
> Hi,
>
> During a postback is there anyway of knowing for sure if it was due to the
> user hitting the Refresh button?
>
> Thanks.
>



 
Reply With Quote
 
 
 
 
John Blair
Guest
Posts: n/a
 
      09-06-2005
Thanks for the feedback, but once the user hits the Refresh button on the
browser as far as im aware the next time you have code control is in the
server page_load/page_init event - so i dont see any scope for doing a
redirect?

The postback data arrives as per the previous postback prior to doing the
refresh. Hence my problem with knowing if the refresh button was hit or not?


"Peter Rilling" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> You will probably need to handle this yourself like keep track of when
> something has been posted.
>
> What I usually do is to do a Redirect back to the page so that there is no
> form data to send back when refreshing the page.
>
> "John Blair" <(E-Mail Removed)> wrote in message
> news:K2nTe.6588$(E-Mail Removed)...
>> Hi,
>>
>> During a postback is there anyway of knowing for sure if it was due to
>> the user hitting the Refresh button?
>>
>> Thanks.
>>

>
>



 
Reply With Quote
 
Joe Fallon
Guest
Posts: n/a
 
      09-07-2005
Dino Esposito wrote some code to show one way to trap for this:
http://www.dotmugs.ch/events/event.aspx?eid=17
--
Joe Fallon




"John Blair" <(E-Mail Removed)> wrote in message
news:K2nTe.6588$(E-Mail Removed)...
> Hi,
>
> During a postback is there anyway of knowing for sure if it was due to the
> user hitting the Refresh button?
>
> Thanks.
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

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
Remote Desktop Window Does Not Refresh When Roaming =?Utf-8?B?R2F6VUs=?= Wireless Networking 2 07-11-2005 07:44 AM
JSP: Session parameters vanish on refresh. How do I keep them on refresh? Per Magnus L?vold Java 1 10-08-2004 02:52 PM
How do i refresh a datagrid from a pop up window without having to refresh the whole page? Pkenty ASP .Net Web Controls 0 05-28-2004 07:06 AM
using refresh button on the menu bar to refresh two frames. Jawahar Rajan ASP General 1 10-01-2003 09:20 PM
Problem with refresh button breaking automatic refresh brian lanning ASP .Net 0 07-29-2003 07:57 PM



Advertisments