PDA

Click to See Complete Forum and Search --> : Session variables - PLEASE!!!!


turfbult
Feb 25th, 2001, 04:09 AM
Hello,

Can someone please tell me how to "write" and "read"
to/from a session variable.

IE. I need to know how to store something in it and then retrieve that which I stored from it.

Please help,
T

alexmac
Feb 25th, 2001, 05:55 AM
session("myvariable")="test ok"
response.write session("myvariable")

turfbult
Feb 25th, 2001, 06:27 AM
Thanks Alex,

I must be doing something wrong!!

I copied and pasted your code and created a variable
myvariable....

Dim myvariable

When I try to run the code I get the error......

Microsoft VBScript runtime error '800a01f4'
Variable is undefined: 'session'

Thanks,
T

Clunietp
Feb 25th, 2001, 10:27 AM
That's strange

Do you include the directive "EnableSessionState=False" at the beginning of your ASP page? If so, remove it

Do you have sessions enabled in the config of your web app (check using the IIS manager)?

turfbult
Feb 25th, 2001, 10:42 AM
Hey Tom,

Jip, that's what the problem was - EnableSessionState=False!!

Thanks,
T

Clunietp
Feb 25th, 2001, 10:46 AM