The .Net Session Object
The Session object in ASP.NET provides a mechanism for storing data that is specific for each individual user of a web application. The web app can add information to the Session object and retreive information from the session object, this can be acheived from any page within the application.
MSDN defines a session as the period of time that a unique user interacts with a Web application. Essentially, session state is memory in the form of a dictionary object or hash table - storing key-value pairs which can be manipulated for the duration of a users session.
'setting a session value
Session("CustomerName") = "Bob Jones"
'retreiving session value
Dim cName
cName = Session("CustomerName")
Session Timeout
It is often useful in an ASP.NET site to know for a particular request if the user’s session information is still intact (that a timeout has not occurred). This is the number of minutes before an ASP.NET user session is terminated. It must be an integer, and it is in minutes. The default is to terminate the session after 20 minutes.
Session can be set in the web.config as follows:
<system.web>
<sessionState timeout="20" />
<system.web>