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


