WEB DEVELOPER SITE
HTMLCSSJAVASCRIPTSQLPHPBOOTSTRAPJQUERYANGULARXML
 

ASP Variables


A variable is used to store information.


If you wanted to print out the variables, you could simply do a Response.Write. Here is an example:

<%@ LANGUAGE="VBSCRIPT" %>
<%
    'Declare a variable. A single tick denotes
    'a comment in VBScript
    Dim MyName

   MyName = "Amanda stacy"

    'Print out MyName
    Response.Write(MyName)

    'To concatonate strings in VBScript, use the
    'amperstand
    Response.Write("My name is " & MyName)
%>

Since variables are Variant, you may be wondering how you can tell what, exactly, is in them. There are some built-in functions which help you in this task.

<%@ LANGUAGE="VBSCRIPT" %>
<%
    'Declare the variable MyName.
    Dim MyName

    MyName = "Scott Mitchell"

    'Will print out false
    Response.Write(IsNumeric(MyName))

    'Will print out false
    Response.Write(IsDate(MyName))
%>