What is the use of the session object ?

 
 

You can use the Session object to store information needed for a particular user-session. Variables stored in the Session object are not discarded when the user moves between pages in the application; instead, these variables persist for the entire user-session. The Web server automatically creates a Session object when a Web page from the application is requested by a user who does not already have a session. The server destroys the Session object when the session expires or is abandoned. One common use for the Session object is to store user preferences. For example, if a user indicates that they prefer not to view graphics, you could store that information in the Session object. Note Session state is only maintained for browsers that support cookies.