HttpContext.Current.Session
Note however that HTtpContext.Current will be null if not in the a web
request context, safe programming would be:
dim context as HttpContext = HttpContext.Current
if context is nothing then
throw new ApplicationException("Must be used from within web context")
'or deal with it some other way
end if
dim session as HttpSessionState = context.Session
'can use session from here on end.
Karl
--
MY ASP.Net tutorials
http://www.openmymind.net/
"Rock" <ro********@yahoo.com> wrote in message
news:uZ**************@TK2MSFTNGP11.phx.gbl...
I have created several forms with procedures that I want to move to a
class so it can be used by other forms, but get an error when I move the Session
commands; e.g., Session("Mode")="Add"
How can I use Session in a class procedure.