ASP Session.Contents() - Session Object Gets a reference to the current session-state object.
ShotDev Focus:
- The current Session State.
Syntax
<%
Session.Contents("Session-Name")
%>
Example
asp_session_contents.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"
'Response.write Session.Contents("SiteName")
'Response.write Session.Contents("Creator")
'Response.write Session.Contents("Version")
Dim List
For Each List In Session.Contents
Response.write List &" = " &Session.Contents(List) & "<br>"
Next
%>
</body>
</html>
Create a asp file and save to path root-path/myasp/
Run
http://localhost/myasp/asp_session_contents.asp
Screenshot
.
.
.


