Session state allows you to store information for a particular visitor session in between requests. An example of a session is a visitor browsing your site. Session state lets you store information relevant to the session via a dictionary-type syntax:
Session["book"] = "ASP.NET Site Performance";
Retrieval is just as easy:
string bookName = (string)Session["book"];
In the default InProc mode, the session state information is stored in memory. That's fast, but won't work if you use multiple web servers, because the next request from the same visitor may go to another server. The StateServer and SQL Server modes cater to server farms by storing session state on a central server or database. If the mode is set to something ...