HOME > ASP > ASP Object > ASP Session.Contents.RemoveAll() - Session Object
ASP Session.Contents.RemoveAll() - Session Object
Session.Contents.RemoveAll() เป็น Methods ที่ใช้ลบค่า Session ทั้งหมด (Delete All Session)
Syntax
<%
Session.Contents.RemoveAll()
%>
ASPSessionContentsRemoveAll.asp
<% Option Explicit %>
<html>
<head>
<title>ThaiCreate.Com ASP Session Object</title>
</head>
<body>
<%
Session.TimeOut = 20
Session("SiteName") = "www.ThaiCreate.Com"
Session("Creator") = "Mr.Weerachai Nukitram"
Session("Version") = "2008"
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>