|
-
May 25th, 2004, 08:44 AM
#1
Thread Starter
Member
Page resets when refresh clicked.
I have an ASP.NET framework page which display menus on the left, and a frame with pages on the right.
The pages change depending on what menu option someone selects from the framework page.
When a user hits the browsers refresh button, the current page on the frame is lost and resets to the default start page.
Do you know how I can preserve the page in the frame when a user click refresh?
-
May 25th, 2004, 09:12 AM
#2
Frenzied Member
Are you checking if the Page.IsPostBack?
Being educated does not make you intelligent.
Need a weekend getaway??? Come Visit
-
May 25th, 2004, 09:30 AM
#3
Thread Starter
Member
yes. I'm in the page load event, i'm doing my framework page setup with
if (!Page.IsPostBack) {
...
}
But it always goes into the above code if I hit refresh. It's as if its a new page, but really it's just a refresh.
-
May 25th, 2004, 11:58 AM
#4
Frenzied Member
Post the code in your page load event.
Being educated does not make you intelligent.
Need a weekend getaway??? Come Visit
-
May 26th, 2004, 04:03 AM
#5
Thread Starter
Member
I just realised that whenever you hit refresh, it reloads the page as if its a new page.
Now I just have to figure out how to record an event just before the user hits refresh and then save that info somewhere so that when the page loads, I can change the page that is displayed in the frame back to the one it was on.
Posting page loading code would not be helpful since it goes into many other functions to set the page up, all the code is not in the page load method (also using javascript)
-
May 27th, 2004, 04:15 AM
#6
Thread Starter
Member
I found a possible solution, which is to create a session parameter on each page containing the URL of that page.
Then on the main framework page, when it reloads I can read that session parameter and set the frame to that page.
Any other idea's also welcome.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|