Clearing Session variables

sj1187534

Well-known member
Joined
Jun 10, 2003
Messages
108
Location
Dallas, Houston, etc.etc.
Hi,
How can we clear the session? I tried to use Session.Clear(), Session.RemoveAll() and Session.Remove("variable") but nothing seems to work. After I logout, I am still able to come back to the previos page!!!

this is the code from the logout.aspx.vb :
===========================
Session.Remove("username")
Session.RemoveAll()
Session.Clear()
===========================

and this is the secured page that checks if a user is logged in :
===============================
If Session("username") = Nothing Then
Response.Redirect("Login.aspx")
End If
===============================
Whats wrong with this code?


SJ
 
Back
Top