|
-
Sessions or Cookies, Arrays or Dictionary Objects?
I've written a simple shopping cart to hold domain names and lengths (years)
for a domain registration site. I've done it with Arrays and Sessions, but
now after reading many articles on sessions I feel so guilty!
Would cookies be a better plan? How would I store an array in a cookie?
Would a Dictionary Object be a better idea?
Here is my code right now:
Dim i ' A Counter
Dim arrCart(50,1) ' The Cart Array
Dim iCart ' Tells How Many Items In Cart
(UBound(arrCart) always = 50)
For i = 0 to iCart
arrCart(i,0) = Session("arrCart(" & i & ",0)")
arrCart(i,1) = Session("arrCart(" & i & ",1)")
Next
---------------------------------------------------------
Is there an easier way to do this? I have a felling that if I do this with
cookies, it will create a cookie for each item in the cart which would limit
the amount of items to 20 for many users.
Any help would be REALLY appreciated!
Thanks so much,
Bradley Dean
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks