Session Object!!

  • Thread starter Thread starter Adam J Knight
  • Start date Start date
A

Adam J Knight

Hi all,

I have just migrated a project from Web Matrix to VS.
The project contains a class which retrieves values in the Session object.

I am attempting to retrieve an instance of the Session object this way.

I was certain that this worked previously???

Unfortunately is VS i am getting the error, 'System.Web.UI.Page cannot be
used as an expression.

'retrieve session object from page
Session = CType(System.Web.UI.Page) System.Web.HttpContent.Current.Handler

Can someone help me fix???

Cheers,
Adam
 
Context.Current.Session["string"] should work just fine.

--
Regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
The Microsoft Office Web Components Black Book with .NET
Now Available @ www.lulu.com/owc
Forth-coming VSTO.NET - Wrox/Wiley 2006
 
Back
Top