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