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
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.
Be the first to post comment on this article :