How to reference Session variable in module?

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.
 
M

Mark Rae

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")
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top