SQL PHP HTML ASP JavaScript articles and free scripts to download
 

Syntax for declaring variables in ASP

ASP ( VB Script ) provides also easy use of variables but some of the basic syntax is to be followed. One of the biggest advantage of ASP variables is it is not case sensitive. If I declare a variable as my_var then I can still access the same variable by calling it as My_var.

We also have to follow some syntax for declaring variables.

All variables declared must start with a letter. Number or any other key are not accepted as variable. So variable name like 1my_var is not accepted but my1_var is accepted.

Length of the variable name should not exceed 255 characters.

Space period and dashes are not allowed within the variable name.

Reserve words are not allowed. Example we can't declare response as a variable
Dim response

The best way is to be use descriptive variable names for easy understand of the purpose and identification. Birth date variable should be declared as variable like birth_date

We will use more ASP code and see the use of variables in other tutorials.

Further readings
Syntax of declaring variables in ASP
Explicit declaration of variables
Getting the data type of the variable using TypeName
 
Scripts
PHP
JavaScript
All ASP Tutorials
Popular Tutorials
Managing two drop downs
ASP Tutorials
Date and time
Declaring array
Form in ASP
Server.MapPath
Date Time & MSSQL
Select Query
File System Object
Subscribe
Submit your email address and receive article and product notifications. Your email is safe with us.