Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Using the browser back arrow

Reply
Thread Tools

Using the browser back arrow

 
 
=?Utf-8?B?RGVuaXNl?=
Guest
Posts: n/a
 
      07-27-2005
In my application, I am setting cookies used for other pages based on the
current row selected. But when the user presses the 'back' button, the
pageload event does not get called and the record they are viewing does not
match the cookie and can lead to data entry errors. Is there a way to
resolve this?

Thanks,
Denise
 
Reply With Quote
 
 
 
 
=?Utf-8?B?U3JlZWppdGggUmFt?=
Guest
Posts: n/a
 
      07-27-2005

When browser back button clicked, the page is loaded from users cache.. one
way is to expire the first page , so that when the user clicks back button
from second page, the browser shows a message that page is not available,
forcing them to use the navigation provided in the site ..

private void Page_Load(object sender, System.EventArgs e)
{
ExpirePageCache();
//.......rest of the page_load logic....................
}


/// <summary>
/// This function prevent the page being retrieved from broswer cache
/// </summary>
private void ExpirePageCache()
{
Response.Cache.SetCacheability(HttpCacheability.No Cache);
Response.Cache.SetExpires(DateTime.Now-new TimeSpan(1,0,0));
Response.Cache.SetLastModified(DateTime.Now);
Response.Cache.SetAllowResponseInBrowserHistory(fa lse);
}

Sreejith

"Denise" wrote:

> In my application, I am setting cookies used for other pages based on the
> current row selected. But when the user presses the 'back' button, the
> pageload event does not get called and the record they are viewing does not
> match the cookie and can lead to data entry errors. Is there a way to
> resolve this?
>
> Thanks,
> Denise

 
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
'Back Button (Arrow)' Puzzle ? Mel Smith HTML 42 07-30-2010 03:17 PM
No active back arrow Cueless Firefox 1 07-18-2007 02:44 AM
no "back" arrow/button bill1997@comcast.net Computer Support 2 06-03-2007 05:43 PM
Firefox Question Re The Green "Back Arrow" Robert11 Computer Support 1 11-07-2006 03:32 PM
Back arrow greyed out in My Computer. JohnQ Computer Support 23 05-15-2005 03:57 PM



Advertisments