How to reference Session variable in module?

  • Thread starter Thread starter Paul W
  • Start date Start date
P

Paul W

On .aspx pages I can do simply: myvar=Session("myvar").

However, this gives a syntax error when I try and do it in a VB module. I've
tried System.Web.SessionState.HttpSessionState("myvar") but this doesn't
work either. Can someone please help?

Thanks,

Paul.
 
Paul W said:
On .aspx pages I can do simply: myvar=Session("myvar").

However, this gives a syntax error when I try and do it in a VB module.
I've tried System.Web.SessionState.HttpSessionState("myvar") but this
doesn't work either. Can someone please help?

HttpContext.Current.Session("myvar")
 
Back
Top