%@ LANGUAGE = VBScript %>
<% Option Explicit %>
Variable Sample
Variable Sample
Integer Manipulaiton
<%
' Declare variable
Dim intVariable
' Assign the variable an integer value
intVariable = 5
%>
<%=intVariable%> + <%=intVariable%> =
<%=intVariable + intVariable%>
String Manipulation
<%
' Declare variable
Dim strVariable
' Assign the variable a string value
strVariable = "Jemearl"
%>
This example was done by <%=strVariable + " Smith" %>
Boolean Manipulation
<%
' Declare variable
Dim blnVariable
' Assign the variable a boolean value
blnVariable = true
' Output message based on value
If (blnVariable = true) Then
Response.Write "The boolean value is True.
"
Else
Response.Write "The boolean value is False.
"
End If
%>
Date and Time
<%
' Declare variable
Dim dtmVariable
' Assign the variable a value
dtmVariable = #08 / 27 / 97 5:11:42pm#
%>
The date and time is <%=dtmVariable%>
<%
' Set the variable to the web server date and time
dtmVariable = Now
%>
The system date and time is
<%=dtmVariable%>