[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1048
  • 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

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

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