• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 399
  • Last Modified:

storing datatable in session

I need to be able to retrieve my shopping cart information in another page to print the info. So I am storing it in session as:

Session("cart") = datagrid1.datasource

Is there any downside to storing this in session?
Since this is shopping cart, I am thinking maximumum number of records cant be too high. Please suggest if there is any adv / disadv to storing this in session. Thanks
0
TrialUser
Asked:
TrialUser
5 Solutions
 
Kalpesh ChhatralaSoftware ConsultantCommented:
0
 
himanshutCommented:
Well, by using sessions you'll definitely be able to access the values over the different pages.
But the only disadvantage can be if you don't clear out the sessions once they have been consumed by the application, it can be a security risk and overload to your application memory.

0
 
HainKurtSr. System AnalystCommented:
I say session... if you use db to store sessions it is better, so you can use web farm...
cart items cannot create security issue... if they login, you can store them into db and clear the session if you want... so after they login again, they can continue their cart... before login, it will be in session... when user closes the browser without emptying cart, it will be cleared after session timeout reaches (20 min by default)

using cookies, writing to temp files, using viewstate, form variables, query strings.... just more headache...
0
 
SAMIR BHOGAYTAFreelancer and IT ConsultantCommented:
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now