help with Dictionary object in vbscript

admin

Administrator
Staff member
i have got a dictionary object which i use to store the cart details with the help of a session variable which stores the dictionary object when we move across pages.

when i try to add some keys to the dictionary , it happens with no problem, but if i try to remove one particular item in the dictionary object , it says the element doesnot exist and hence unable to delete that particular item.

pls modify the code attached with this mail along with ur definitions

Thank you

(Note: I have changed the extension of the asp file as html)You should really look into storing your cart items in a database and just storing the cartID in your session.

Scripting Dictionaries take up a lot of space and are not efficient. If someone added say 100 items to their cart, you are storing all that information in the session. Your server is going run really slow because of the massive amount of session data in memory.if i a user is going to go back and forward again. then it would mean a lot of writes to the db which i think is not equally efficient.

but as a experienced programmer, if u think your way is the best to be done, then I will go by yours.

anyway, thank you very much

if you also know to solve the problem with the dictionary , i would happier since I want more clarity on the problem with dictionary.I agree with rdove. Its not really handled gracefully.

Placing objects in a session locks the requests down for that session also. It will slow the server almost instantly when you have more than just 10 people on it.Thank you very much for both of you for helpin me find out the best way to handle the cart.

my doubt now is:
1. Whether session variables are unique to every user?
2. Should I use Cookies to maintain Login information?
3. Is it possible to login as two different users(different pages) in a site like ebay from a same single computer?Yes the are assigned by an identifier that the process request maps to the correct session, which is a heap of memory on the server.

Only some Guid or something should be stored in the cookie.

Anything is possible.
 
Back
Top