ASP/VBScript TypeName() Returns a string that provides Variant subtype information about a variable.
ShotDev Focus:
- Using Asp and TypeName() function.
Example
asp_typename.asp
<% Option Explicit %> <html> <head> <title>ShotDev.Com Tutorial</title> </head> <body> <% ReDim strVar1(3) Dim strVar2,strVar3,strVar4 strVar1(0) = 1 strVar1(1) = 2 strVar1(2) = 3 strVar1(3) = 4 strVar2 = "Weerachai Nukitram" strVar3 = 123456 strVar4 = Array(1,2,3,4,5) Response.write TypeName(strVar1)&"<br>" Response.write TypeName(strVar2)&"<br>" Response.write TypeName(strVar3)&"<br>" Response.write TypeName(strVar4)&"<br>" %> </body> </html>
Create a asp file and save to path root-path/myasp/
Run
http://localhost/myasp/asp_typename.asp
Screenshot