SitePoint Sponsor |
|
User Tag List
Results 1 to 3 of 3
-
Jan 8, 2007, 15:49 #1
- Join Date
- Jun 2004
- Location
- sds
- Posts
- 35
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
What is the way to clear all Session Variables on first page load?
Hello everyone,
how can i clear the session variables on page load (the first time)?
thanks for help!
-
Jan 8, 2007, 18:27 #2
- Join Date
- Oct 2005
- Location
- Brisbane, QLD
- Posts
- 4,067
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Taken from here:
PHP Code:<%
Session.Contents.RemoveAll()
%>
-
Jan 9, 2007, 10:10 #3
- Join Date
- Jun 2004
- Location
- sds
- Posts
- 35
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
OK.
I should be more specific. I have no problem clearing the session variables:
HttpContext.Current.Session.Clear()
System.Web.Security.FormsAuthentication.SignOut()
HttpContext.Current.User = Nothing
Response.Redirect("~/Login.aspx", True)
I don't know how to do it onPageLoad event with isPostBack property.
Does ASP has this event?
I need to do the Session Clearance just for the FIRST load of the page..
How can i do it in ASP?
thanks!
Bookmarks