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