ASP Session.Contents.RemoveAll() - Session Object Removes all keys and values from the session-state collection.
ShotDev Focus:
- Removes all Session.
Syntax
<% Session.Contents.RemoveAll() %>
Example
asp_session_removeall.asp
<% Option Explicit %>
<html>
<head>
<title>ShotDev.Com Tutorial</title>
</head>
<body>
<%
Session.TimeOut = 20
Session("SiteName") = "www.ShotDev.Com"
Session("Creator") = "Mr.Weerachai Nukitram"
Session("Version") = "2010"
Dim List
For Each List In Session.Contents
Response.write List &" = " &Session.Contents(List) & "<br>"
Next
Response.write("<hr>")
Session.Contents.RemoveAll()
Dim i
ForĀ i = 1 To Session.Contents.Count
Response.write Session.Contents.Key(i) &" = " &Session.Contents(i) & "<br>"
Next
%>
</body>
</html>
Create a asp file and save to path root-path/myasp/
Run
http://localhost/myasp/asp_session_removeall.asp
Screenshot
.
.
.



1paintball…
…