Discussion:
HELP - SESSION VARIABLES
(too old to reply)
Mark Roberts
2004-05-09 12:04:49 UTC
Permalink
hi,
After someone logs in to my site's main page I capture the user i.d. to a
session variable like this:

"Dim requestorID
session("requestorID") = Request("HidUserID")"

When I perform "Welcome <%=session("requestorID")%>"
it displays "Welcome userid" as it should. Whenever I go to another page in
the application and then return to the main page it displays "Welcome" only.

Why does the session variable disappear? I have "<%Response.Buffer =
True%>".
the Wiz
2004-05-10 00:20:10 UTC
Permalink
Post by Mark Roberts
hi,
After someone logs in to my site's main page I capture the user i.d. to a
"Dim requestorID
session("requestorID") = Request("HidUserID")"
When I perform "Welcome <%=session("requestorID")%>"
it displays "Welcome userid" as it should. Whenever I go to another page in
the application and then return to the main page it displays "Welcome" only.
Why does the session variable disappear? I have "<%Response.Buffer =
True%>".
Been there, done that ;-) Session variables are, at best, marginally reliable
(long explanation skipped).

The *reliable* methods of passing variables are:

1. Pass the variable from page to page in a form variable.

2. Pass the variable as part of a querystring.

3. Save the variable on the user's computer as a cookie.

I use the first two methods in an online scheduling system that is used by
government agencies in more than a dozen countries.

More about me: http://www.jecarter.com/
VB3/VB6/C/PowerBasic source code: http://www.jecarter.com/programs.html
Freeware for the Palm with NS Basic source code: http://nsb.jecarter.com
Drivers for Pablo graphics tablet and JamCam cameras: http://home.earthlink.net/~mwbt/
johnecarter ***@at mindspring dot.dot com. Fix the obvious to reply by email.
Loading...