ASP

ASP Variables Strings Form Arrays 2D Array Loop IF Cookies Dates Dictionaries SQL Numbers Files JSON Database Regular Expression ExecuteGlobal Recordset ServerVariables Bugs ADO AJAX XML Chilkat
O O

Weather Controls

Time Of Day
Rain
Wind Speed
Wind Direction
Clouds

ASP : Variables

2018-09-26

Declare A Variable

Dim name // this is optional
name="Rob"

Constant

This var cannot be changed later.

Const PI = 3.14159

Make Dim Required : "Option Explicit"

This is good coding convention.

<%@ LANGUAGE="VBSCRIPT" %>
<% Option Explicit %>

Get Type of Variable

salary = 150000
TypeName(salary)   // Long

name = "Rob"
TypeName(name)   // String

Return Bool of Type

name = "Rob"
IsNumeric(name)  //false
IsDate(name) //false

References

http://www.4guysfromrolla.com/webtech/faq/Beginner/faq4.shtml

http://www.4guysfromrolla.com/webtech/faq/Intermediate/faq6.shtml