The sessionState allow you to store information not in the ViewState, but in the HttpSession object. See MSDN.
To enable the sessionState, you will have to modify your web.config. All lines which need to be modified, are within the <system.web> tag:
In the default settings, the httpModule for the session state is commented out. We will simply remove the "<!--" and "-->" around the line.
1: <httpModules>
2: <clear />
3: ...
4: <add name="Session" type="System.Web.SessionState.SessionStateModule"/>
5: ...
6: </httpModules>
Change the value for enableSessionState from "false" to "true":
1: <pages enableSessionState="true" enableViewState="true" ...>
That's it. Now you can use the session state.
Tags: sessionState web.config