Re: querystring and going back in browser
From: Rocky Moore (gRockyMoore_at_hintsandtips.com)
Date: 02/01/04
- Next message: Nakul: "Re: Left Align Text In Server Button"
- Previous message: Ray at <%=sLocation%> [MVP]: "Re: Major security issue?"
- Next in thread: tony collier: "Re: querystring and going back in browser"
- Reply: tony collier: "Re: querystring and going back in browser"
- Messages sorted by: [ date ] [ thread ]
Date: Sun, 1 Feb 2004 02:21:11 -0800
If you have a button, why not user a server control like linkbutton or a
button and grab the onClick in your code behind. Then when they click it,
you could have a field somewhere on the screen that you would update saying
it has been added.
Since it is not passed in a querystring as you have been processing it, you
would only need to process in the OnClick which is only triggered if it is a
postback event.
-- Rocky Moore www.HintsAndTips.com - Share your tips with the world! ~~~~~~~~~ Developer Tips Welcome! ~~~~~~~~~ "tony collier" <melakka@hotmail.com> wrote in message news:Xns94813CB51441Emelakkahotmailcom@194.117.133.134... > Hi all > > I have a shopping cart which I have had to use querystrings to > add/remove items rather than a form. for example, i have a page with a > list of items and next to each one is a button which when clicked refers > to the same page with a different querystring item=12, item=33 etc. > > My pageload routine then checks for any query strings and if it finds an > item value, adds this to the respective session variable. > > My problem is that if a client adds an item, goes to checkout or any > other page for that matter, then decides to go back in the browser to > the itemlist page, the item gets added again because the querystring is > reloaded along with the page. > > Any ideas how I can make sure that items are only added/removed when the > referrer is the same page? > > thanks.
- Next message: Nakul: "Re: Left Align Text In Server Button"
- Previous message: Ray at <%=sLocation%> [MVP]: "Re: Major security issue?"
- Next in thread: tony collier: "Re: querystring and going back in browser"
- Reply: tony collier: "Re: querystring and going back in browser"
- Messages sorted by: [ date ] [ thread ]