Just my opinion but I think you should stay away from this where possible.
Use properties or pass the data when you call the method that needs it.
--
Derek Davis
(E-Mail Removed)
"Gregory Pearce" <(E-Mail Removed)> wrote
in message news:ZC2Xe.51342$(E-Mail Removed)...
> Hi,
> Can anyone tell me if it is possible to access a session within a class?
> I have created a class that has
>
> if ((Session["Books"] == null) etc....
>
> However upon building the project, the name Session has a problem. I have
> tried adding usingSystem.Web etc to the class however cannot seem to
> rectify the problem.
>
> Any ideas anyone?
>
> Many thanks for everyone's help so far. I am still a bit new with C# and
> really appreciate everyone's help :-)
>
> Cheers - Greg :-)
>
>