Hi Mark,
here's the piece of the code:
---------------------------------------
on my cart.aspx page:
---------------------------------------
Dim ala As New ShoppingCart
If Not IsNothing(Session("shoppingcart")) Then
ala = Session("shoppingcart")
End If
Dim objCartItem As New cartitem
Dim intItems As Integer
objCartItem.itemcode = seqid
objCartItem.itemname = seqname
objCartItem.qty = Qty
objCartItem.ddate = eventDate
objCartItem.unitprice = unit
objCartItem.total = objCartItem.unitprice * objCartItem.qty
ala.addCartItem(objCartItem)
Session("cartcount") = ala.CountItemsinCart.ToString
Session("shoppingcart") = ala
----------------------------------------------------------
on Global.vb class:
----------------------------------------------------------
Public _ItemsinCart As New Collections.ArrayList
----------------------------------------------------------
on a separate class called ShoppingCart.vb :
----------------------------------------------------------
Public Structure cartitem
Public itemcode As String
Public itemname As String
Public ddate As DateTime
Public unitprice As Decimal
Public total As Decimal
Public coupon As String
Public grandtotal As Decimal
Public qty As Long
Public schedulecode As String
End Structure
Public Sub addCartItem(ByVal item As cartitem)
If Not isItemExists(item) Then
_ItemsinCart.Add(item)
End If
End Sub
Everything seems to be fine except when i try to open another browser on
another computer i get the same shopping cart items from the first computer.
Does this have something to do with in process or out process memory thing?
thanks
"Mark Rae" wrote:
"ChiWhiteSox" <Ch*********@discussions.microsoft.comwrote in message
news:15**********************************@microsof t.com...
Session("cart") is an array of prodID,desc,qty and amount.
No doubt, but how / where is it declared...?
I add an item by adding the prodID to the BearArray() and re assigning
that
array to the Session("cart") variable. These all revolves in a class
called
shoppingcart.vb
Is there something wrong with what im doin?
Impossible to tell until you actually show us your code...