By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,960 Members | 2,459 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,960 IT Pros & Developers. It's quick & easy.

Recognizing Page Refresh in On_Unload

P: n/a
Hey all,

Does anyone know how i can detect a refresh of the page in the unload
event on the server?

The problem I'm having is that refresh automatically calls the previous
event that happened via a postback. So if you click save in our app,
itll call save again if you refresh. I would like to grab that refresh
and have it execute a different command which clears out the screen and
repopulates the latest data (i.e. a real refresh) but i need to know
how to recognize the refresh in unload.

Sep 27 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Areric wrote:
Hey all,

Does anyone know how i can detect a refresh of the page in the unload
event on the server?

The problem I'm having is that refresh automatically calls the previous
event that happened via a postback. So if you click save in our app,
itll call save again if you refresh. I would like to grab that refresh
and have it execute a different command which clears out the screen and
repopulates the latest data (i.e. a real refresh) but i need to know
how to recognize the refresh in unload.
After your safe, just redirect to the page itself. That way the user
will get a 'fresh' history item which an be refreshed as many times as
you'd want. Another solution is to keep some kind of dictionary of pages
you've seen in the last session (based upon a unique number in the
viewstate for example) and cancel all event in case you're seeing the
same number twice.

Jesse
Sep 27 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.