Re: Suggestions on storing shopping cart info

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



But to perisist it using a session var doesn't using a List allow you to
easily access, add and remove items in the cart? Or should I just use an
arraylist of the cart items?

I was just looking at this and it seemed like a good idea...
http://www.java2s.com/Code/VB/Generics/GenericListstoresGenericClass.htm

By the way i'm not sure what "top-posting" is. I just hit "Reply to Group"
in Outlook Express. :)

"Mark Rae [MVP]" <mark@xxxxxxxxxxxxxxxxx> wrote in message
news:%23yNHH7QAJHA.716@xxxxxxxxxxxxxxxxxxxxxxx
"Cirene" <cirene@xxxxxxxxxxx> wrote in message
news:O4ZMaYOAJHA.5048@xxxxxxxxxxxxxxxxxxxxxxx

[please don't top-post]

That's what I do, though I tend to use a generic e.g. Dictionary<int,
int> to store the ID of the purchased product along with the number of
items purchased...

Would using a generic list (of these objects) be the best way to handle
this in your opinion? Store that to a session variable?

No it wouldn't, otherwise that's what I'd be doing. I've never found any
need to persist anything other than the ID of the item bought together
with the number of items purchased.


--
Mark Rae
ASP.NET MVP
http://www.markrae.net


.



Relevant Pages

  • Re: Suggestions on storing shopping cart info
    ... should I store this info in a session var? ... if you want the customer to be able to ... to keep track of what's in the cart, ... to store the ID of the purchased product along with the number of items ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Suggestions on storing shopping cart info
    ... Store that to a session var? ... shop more, should I store this info in a session var? ... to keep track of what's in the cart, ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Suggestions on storing shopping cart info
    ... should I store this info in a session var? ... Alternatively, if you want the customer to be able to save the cart and come back to it later, you should save it to a database... ... to store the ID of the purchased product along with the number of items purchased... ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Victim of a Theft
    ... I left the supermarket and pushed my cart after paying for my groceries ... sidewalk where my trike was parked and chained 20 feet away. ... the trike and went back for another bag containing the items listed ... The store person talked to the manager who said they would replace the ...
    (soc.retirement)
  • Re: Thinking about a second--1st is 8 months old--any regrets?
    ... It's hard to imagine how I'd keep one child ... How on earth do you do anything (like travel or go to the store) ... park as near a cart return as you can. ... Bizby ...
    (misc.kids)