G
Guest
Hi,
How can I access a session variable within a Public Class?
I have tried the below code, but I get a server error "Object reference not
set to an instance of an object".
System.Web.HttpContext.Current.Session.Add("myKey", "myValue")
Dim a As String
a = System.Web.HttpContext.Current.Session.Item("myKey")
Thanks,
Thomas Andersson
How can I access a session variable within a Public Class?
I have tried the below code, but I get a server error "Object reference not
set to an instance of an object".
System.Web.HttpContext.Current.Session.Add("myKey", "myValue")
Dim a As String
a = System.Web.HttpContext.Current.Session.Item("myKey")
Thanks,
Thomas Andersson