|
Subject:
|
Session Variable Problem
|
|
Posted By:
|
leo_vinay
|
Post Date:
|
9/26/2003 8:03:16 AM
|
The problem is simple...can u pls tell me the reason A simple code is here: <% Session("Name") = "ABC" Response.write "After creating session variable name...its value = "&Session("Name") Session.abandon response.write "After destroying Session variable name...its value = "&Session("Name") %> ---Even after abandoning the Session still it gives "ABC" ---What might be the reason..pls help me out
|
|
Reply By:
|
Imar
|
Reply Date:
|
9/26/2003 8:11:06 AM
|
When you call Session.Abandon, the Session variables are still available in the current page.
It's usually a good idea to have Session.Abandon followed by a Response.Redirect instruction, for example to a page called Logout.asp (to inform the user they have ended their session) or to the home page or any other page.
This way, you can be sure that the Session variables are no longer accessible.
Cheers,
Imar
--------------------------------------- Imar Spaanjaars Everyone is unique, except for me.
|
|
Reply By:
|
quetzalcoatl
|
Reply Date:
|
10/9/2003 10:49:00 AM
|
How i had the same problem i decided to do the next thing
Session("varName") = ""
and after that
Session.Abandon
Greetings
|
|
Reply By:
|
viralshah
|
Reply Date:
|
2/15/2004 11:28:46 AM
|
hi Try out this .
When a user clicks log out then redirect him/her to a signout.asp page where the code mustbe like this Session.Abandon() and a again redirect him/her to the destination page. I had used the same logic in my website and i am sure it working
bye viral
|