web 2.0

ASP/VBScript VarType()

ASP/VBScript VarType() Returns a value indicating the subtype of a variable.

ShotDev Focus:
- Using Asp and VarType() function.

Example

asp_vartype.asp


<% Option Explicit %>
<html>
<head>
<title>ShotDev.Com Tutorial</title>
</head>
<body>
<%
Dim strVar1(3),strVar2,strVar3
strVar1(0) = 1
strVar1(1) = 2
strVar1(2) = 3
strVar1(3) = 4

strVar2 = "Weerachai Nukitram"

strVar3 = 123456

Response.write VarType(strVar1)&"<br>"
Response.write VarType(strVar2)&"<br>"
Response.write VarType(strVar3)&"<br>"
%>
</body>
</html>

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

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

Screenshot

ASP/VBScript & VarType()

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