|
-
Jun 15th, 2001, 02:55 AM
#1
Thread Starter
Addicted Member
Session Variables???
I use a Session variable called Session("UserName") to store a users username. When I set this variable and the close the browser window, the session is only supposed to end when when the session times out, Right? (20 minutes)
Why then when I open the browser again, before 20 min, is that session varaible lost? I have checked and the sessionID stays the same if I open and close the browser. Nowhere in my pages do I clear the variable, and nowhere do I call the session.abandon method???
Any explanations??
-
Jun 15th, 2001, 06:13 AM
#2
Black Cat
When I set this variable and the close the browser window, the session is only supposed to end when when the session times out, Right? (20 minutes)
Yes, that is right.
Why then when I open the browser again, before 20 min, is that session varaible lost?
Because the Session ID is actually a temporary Cookie sent to the Browser. When you close the browser, the Cookie is deleted from memory.
Josh
Get these: Mozilla Opera OpenBSD
I have books for sale: "MCSD in a Nutshell" and "VB Distributed Exam Cram" - PM me for details. Will also trade for a decent ATX Pentium 2 MB/CPU/RAM combo.
-
Jun 15th, 2001, 06:17 AM
#3
josh is right. if you want it to persist, create a cookie instead of the session variable.
Everything that has a computer in will fail. Everything in your life, from a watch to a car to, you know, a radio, to an iPhone, it will fail if it has a computer in it. They should kill the people who made those things.- 'Woz'
save a blobFileStreamDataTable To Text Filemy blog
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|