Asp Vbscript Cheat Sheet

ADVERTISEMENT

Methods
Functions
ASP / VBScript
Request
String
BinaryRead
FormatCurrency
InStr
Response
LCase
AddHeader
Left
AppendToLog
Len
REGULAR EXPRESSIONS - PATTERNS
FUNCTION ARGUMENT ORDERS
BinaryWrite
Mid
Clear
Replace
^
DateAdd(Interval, Number, Date)
End
Start of string
Response.write
Flush
Right
$
DateDiff(Interval, Date1, Date2)
End of string
Redirect
String
.
Any single character
InStr(Start, String, Substring, Compare)
Write
StrReverse
(a|b)
FormatDateTime (Date, DateFormat)
a or b
Trim
REGULAR EXPRESSIONS - MODIFIERS
Application
(...)
Group section
Join(Array, Delimiter)
UCase
Lock
[abc]
Left(String, Length)
Item in range (a or b or c)
/g
Unlock
Global matching
Date
[^abc]
Not in range (not a or b or c)
Replace(Haystack, Needle, Replacement)
Date
/i
Case insensitive
[a-z]
Split(Expression, Delimiter)
Any lower-case letter
Session
DateAdd
/s
Single line mode
Abandon
[A-Z]
Any upper-case letter
DatePart
/m
Multi line mode
DateSerial
[0-9]
Any numeric digit
FILE MODES
Server
Day
a?
Zero or one of a
CreateObject
FormatDateTime
a*
1
Zero or more of a
Reading
Execute
Hour
GetLastError
a+
2
Writing
Minute
One or more of a
HTMLEncode
Month
a{3}
3
Exactly 3 of a
Appending
MapPath
MonthName
a{3,}
3 or more of a
Transfer
Now
a{3,6}
Between 3 and 6 of a
COMMON LCID CODES
URLEncode
Second
!(pattern)
Weekday
"Not" prefix. Apply rule when
Properties
2057
WeekdayName
English (UK)
URL does not match pattern.
Year
1033
English (US)
\b
End of word
Response
1036
French (France)
\n
New line
Arrays
Buffer
1031
German (Germany)
\r
Carriage return
Join
CacheControl
Redim
1034
Spanish (Spain)
Charset
\
Escape Character
Split
ContentType
\t
Tab
Ubound
Expires
STRING CONSTANTS
\s
White space
ExpiresAbsolute
\w
Any word (= [A-Za-z0-9_])
Mathematical
IsClientConnected
VbCr
Abs
Carriage Return
Pics
Atn
Status
VbCrLf
VbCr and Line Feed
DATE FUNCTION ARGUMENTS
Cos
VbFormFeed
Form Feed
Exp
Request
yyyy
Year
VbLf
Line Feed
Log
TotalBytes
q
Quarter
VbNullChar
Rnd (Randomize)
Null Character
Round
m
Month
Session
VbNullString
Null String
Sin
CodePage
y
Day of Year
VbTab
Tab Character
Sqr
LCID
d
Day
Sgn
SessionID
w
Weekday
Tan
COMPARISON CONSTANTS
Timeout
ww
Week of Year
Collections
Server
h
Hour
0
VBBinaryCompare
ScriptTimeout
n
Minute
1
VBTextCompare
Response
s
Second
2
VBDataBaseCompare
Error
Cookies
ASPCode
ASPDescription
Request
REDIRECT WITH 301 HEADER
NAMED DATE CONSTANTS
Category
ClientCertificate
Column
Cookies
Response.Status="301 Moved
0
vbGeneralDate
Description
Form
Permanently"
1
vbLongDate
File
QueryString
Line
ServerVariables
Response.AddHeader "Location",
2
vbShortDate
Number
"
3
vbLongTime
Source
Application
4
vbShortTime
Response.End
Contents
StaticObjects
INCLUDING A FILE
Available free from
Session
Contents
<!--#include file="include.inc"-->
StaticObjects

ADVERTISEMENT

00 votes

Related Articles

Related forms

Related Categories

Parent category: Education
Go