I have been trying to implement what you had said. Perhaps read somewhere that should avoid storing objects in Sessions. But even having lots of problems
I have enabled sessions in both the ASP.NET pages as below:
<%@ Page language="c#" Codebehind="Categories.aspx.cs" AutoEventWireup="false" Inherits="produits_new.Categories" smartNavigation="False" enableSessionState="True" enableViewStateMac="True"%>
And I am able to store the object in the Session in a xxx.cs file and access it later in another yyy.cs file but when the user clicks a hyperlink to open up another page I can not retrieve the session object in its code behind class. I added a watch on the session object, it says "an Exception of type System.Web.HttpException occured".
However the final error I get is "Session state can only be used when enableSessionState is set to true, either in a configuration file or in the Page directive".
Do you have any idea as to why this is happening? I am already having a tough time ....:)