web 2.0

ASP Session & Array

ASP Session & Object Array This example asp code using Session and Array value.

ShotDev Focus:
- Session and Array

Example

asp_session_array.asp


<% Option Explicit %>
<html>
<head>
<title>ShotDev.Com Tutorial</title>
</head>
<body>
<%
Dim myArr(4),mySession
myArr(0) = "I Love ShotDev.Com 0"
myArr(1) = "I Love ShotDev.Com 1"
myArr(2) = "I Love ShotDev.Com 2"
myArr(3) = "I Love ShotDev.Com 3"
myArr(4) = "I Love ShotDev.Com 4"

Session("mySession") = myArr

'*** Used Session Array ***'
Dim i
For i = 0 To UBound(Session("mySession"))
Response.write Session("mySession")(i) & "<br>"
Next

'*************************'
%>
</body>
</html>

Create a asp file and save to path root-path/myasp/

Run
http://localhost/myasp/asp_session_array.asp

Screenshot

ASP Session & Array Value

.
.
.

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.