plz clarify my doubt

Posted by Webmaster under ASP.NET on 9/6/2008 | Views : 2038 | Status : [Administrator] | Replies : 2
when sessions are used? what is the use of sessions?

Posted on behalf of Komila

Best regards,


Posted by: Bubbly on: 2/23/2010 [Member] Bronze


This article will clear your doubts

Thanks & Regards,

Webmaster, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Raja on: 12/10/2008 [Member] Starter

What is session and use of Session.

Session is used to maitain user specific data on the server.

Lets say, you have something to show to the user after he/she is logged in, instead of getting those data from the database on each request, you can store them into session and display them on every page.

Virtually, you can store any kind of data into the session, however it is suggested to store serialized data into session. It is suggested not to store bulk amount of data into session or try to avoid the session if you can. There are several workaround like storing user specific data into cookies, or maintaining querystring etc. When you store data into session and suppose your website has 100 users at a time, you will have 100 session for all users and if you are storing 10 session objects for a single user you will have 100*10 = 1000 session objects.

Befor using the session objects, you should check for null, otherwise you may get the Nullreference exception.

Raja, USA

Webmaster, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response