Session Object!!

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
 
A

Alvin Bruney - ASP.NET MVP

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top