Click to See Complete Forum and Search --> : session and class not connected


alionzo
08-09-2005, 02:48 AM
dear all,

I create a new module in my project.
In this module I try to access session variables:
data = Session("UserId")
but when I compile it, it return error messages:
Name "session" is not declared.
Please give me a complete syntax, because I'm newbie in asp.net.

thanks,
alionzo

minority
08-09-2005, 08:21 AM
well you just put this in the asp forum some one move this to the .net forum unless it okay in here??##

by the error i am thinking you have not declared the session UserID

in asp you do it like so

session("UserID") = 1

as an example

try doing a response.write to see if there is a value attached to the session as my guess is that there isnt one.