473,796 Members | 2,640 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Using the browser back arrow

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
Nov 19 '05 #1
1 1582

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(objec t sender, System.EventArg s 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 (HttpCacheabili ty.NoCache);
Response.Cache. SetExpires(Date Time.Now-new TimeSpan(1,0,0) );
Response.Cache. SetLastModified (DateTime.Now);
Response.Cache. SetAllowRespons eInBrowserHisto ry(false);
}

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

Nov 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
2567
by: Mike Berger | last post by:
I have a series of .asp pages that a user goes through to <I guess the purpose really doesn't matter>. On each page I have Response.Expires = 0 (which I understand to mean "do not cache this page") On PageInQuestion.asp (in the middle of the series) I use asp code to generate a <select> box with numerous <option>'s, four <a>'s, and an <input type=input> (this will become hidden when site is put in production). I read some fields from...
9
3635
by: jcnews | last post by:
When designing a webpage, is there a way to disable the back button? It must be possible. I am asking because there are certain web applications that I have used that require the user to never press the back button from certain screens. If the back button is pressed, it will bill for charges, even if the user is pressing the back button as a way of canceling. Another example would be Mambo CMS -- if you click the back button on...
14
23267
by: xxbmichae1 | last post by:
I have a <select> object that i've set up an onchange event that fires in IE fine when I use the cursor up and down in the list, but If I use the cursor up and down in Firefox the event doesn't seem to fire until I've left the field....If i use the mouse all is fine, only when using the cursor keys does it not fire the onchange event in FF. Thanks for any help in advance.
5
18230
by: skipc | last post by:
Hi, I am stuck... I've got a popup window that displays a list in table format with links on the bottom to navigate the list <prev> 1 2 3 ... <next> When I demo'd to the users... they immediately asked if they could use the arrow keys and enter key to navigate the list. I think there must be a way to do this, but I can't figure it out.
8
2745
by: sara | last post by:
I am learning Access and programming. I wanted to have the user select the departments for an ad from the list of all departments. Found code (that I could understand) on this site, and it works. But I have 2 quesitons: 1. How can I REMOVE a selection from the Destination List box - and keep the others there? My first code removes ALL from the Source list; this code does nothing. 2. How can I now USE the data - I have to...
1
1804
by: BrainTop | last post by:
This is driving me nuts for last one week. Appreciate any assistance. I have ASP.NET web application with many pages. Some of them post back to itself and then links to another page. Everything was working great so far. Recently we did some modifications (included a new page) and after that things have gone ugly. This is the issue: Lets say the user has browsed through number of pages, came to one particular page (search), posted the...
1
1481
by: prasadsurya | last post by:
My requirement is, i need to capture an event when user closing browser i need to open a pop up window. I got the code which is working fine. But when i go forward and came back to the previous page via back arrow it's showing pop up window but with the help of Backspace from keyboard it's not showing pop up window the same for forward arrow.Below is my sample code: <html> <head> <script type="text/javascript"> var myclose = false; ...
0
2271
by: Stan SR | last post by:
Hi, I need to customize a pargertemplate with these items a arrow to go back to the 1rst page a arrow for the previous page a dropdownlist with the page indexes a arrow for the new page a arrow for the last page. The dropdownlist function is okay, but I m blocked with the arrows
0
9685
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9535
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10465
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10242
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9061
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7558
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6800
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5453
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
3744
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.