web 2.0

ASP Session.Contents.RemoveAll() - Session Object

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

ASP & Session.Contents.RemoveAll()

.
.
.

Download this script.
Download

1 Star2 Stars3 Stars4 Stars5 Stars6 Stars7 Stars8 Stars9 Stars10 Stars (1 votes, average: 1.00 out of 10)
Loading ... Loading ...

One Response to “ASP Session.Contents.RemoveAll() - Session Object”

  1. 1paintball…

Leave a Reply

You must be logged in to post a comment.