• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1054
  • Last Modified:

name session is not declared asp.net

Hi, I'm developing in asp.net vs2005 and I use session variables (i.e. Session("PhotoAdId") = photoId gives the error 'name session is not declared') it works on an aspx pages but not in a .vb file in the same project.
0
Netlink2
Asked:
Netlink2
1 Solution
 
JimBrandleyCommented:
Try:
HttpContext.Current.Session("PhotoAdId")

Jim
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now