web 2.0

ASP Session.Contents() - Session Object

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

ASP & Session.Contents()

.
.
.

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 ...

Leave a Reply

You must be logged in to post a comment.