So in my Imports clause would I need:
imports System.Web.HttpContext
I also saw Imports System.Web.SessionState
If I put in the "imports System.Web.HttpContext", would I then do:
string whatever = (string) this.Session["whatever"];
Also, what .dll would I need in my make file - /r:system.web.dll and
/r:system.dll ?
Thanks,
Tom
"carion1" <dd******@gmail.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
string whatever = (string) this.Context.Session["whatever"];
--
Derek Davis
dd******@gmail.com
"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote
in message news:%2****************@TK2MSFTNGP10.phx.gbl... Tom,
You can use the HttpContext class. If you use the static Current
property on the HttpContext class, it will return your current
HttpContext. You can then use the Session property on the HttpContext to
access the current session.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com
"tshad" <ts**********@ftsolutions.com> wrote in message
news:e5**************@TK2MSFTNGP09.phx.gbl...I am writing some library routines to use in my asp.net pages. They need
to access my session variables, but I don't know what
namespaces/libraries to access to make it work. Asp.net already does
that for you.
How do I access Session variables from my objects?
What refererence (using...) do I need as well as what .dll do I need in
my make file?
Thanks,
Tom