Did you got the following error when using session state in SharePoint 2010?
"Session state can only be used when enableSessionState is set to true,
either in a configuration file or in the Page directive. Please also make
sure that System.Web.SessionStateModule or a custom session state module"
I have the solution for you. you have to add SessionStateModule to your site's web.config file as follows :
1.Open IIS 7 manager and find your web application.
2.Double click "Modules" in the IIS.
3.Click "Add Managed Module" on the right side.
4.In the Add Managed Module dialog, enter "SessionState" or any name you like, and choose the following assembly from the dropdown:
System.Web.SessionState.SessionStateModule, System.Web, Version=188.8.131.52, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a