Discussion Locked

ASP Session variable

0 helpful
8 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I am writing a site using ASP pages/VBScript. I am trying to pass a value using a session variable from one page to another. The page that sets the variable has:

Session("Category") = 1

The page that reads it uses:

Category = Session("Category")

it would appear that the variable is not being written to. I am testing the system on a laptop using PWS. Any ideas?

8 replies

by rajusampath

Please check whether you have initialized the variable "Category" (Dim Category) before reading from the Session Object. Using "Option Explicit" at the beginning of the coding may be good practice for these kind of mistakes

This discussion is closed to new replies.