web 2.0

How to use ASP & ASP/VBScript Dim

How to use ASP & ASP/VBScript Dim This the tutorial/example a scripts how to use ASP & Dim declare variable.

ShotDev Focus:
- ASP & Dim declare variable .

Option Explicit (When Option Explicit appears in a file, you must explicitly declare all variables using the Dim)

Example

asp_dim.asp


<%
Option Explicit
%>
<html>
<head>
<title>ShotDev.Com Tutorial</title>
</head>
<body>
<%
Dim strSiteName
Dim strFullName,strNickName,strVersion
Dim arrVar(2)
strSiteName = "www.ShotDev.Com"
strFullName = "Mr.Weerachai Nukitram"
strNickName = "Win"
strVersion = "2010"
arrVar(0) = "www.ShotDev.Com"
arrVar(1) = "Mr.Weerachai Nukitram"
arrVar(2) = "Win"
Response.write(strSiteName&"<br>")
Response.write(strFullName&"<br>")
Response.write(strNickName&"<br>")
Response.write(strVersion&"<br>")
Response.write("<hr>")

Dim i
For i = 0 To UBound(arrVar)
Response.write(arrVar(i)&"<br>")
Next
%>
</body>
</html>

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

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

Screenshot

ASP & Dim

.

.
.

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.