I have some confusion over best way to store multiple session values. One of my friend told us that define session 3-4 times is heavy rather then define in a HashTable. Like below scenario : The question is which is better one & why.
Hashtable ht = new Hashtable();
ht.Add("UserID", txtUser.Text);
ht.Add("Type", type.Text);
ht.Add("PaypalID", paypal.Text);
Session["hashtab"] = ht; //-- Is this better way or below one.
Session["UserID"] = txtUser.Text;
Session["Type"] = type.Text;
Session["PaypalID"] = paypal.Text;
Any Suggestions really appreciate !
Please light over that in upper scenario my TL told me that hashtable takes minor memory on the server (suppose it takes 500 kb) rather than one by one (suppose it takes 3MB).