The ASP cheat sheet is designed to act as a reminder and reference sheet, listing various of the oft-forgotten parts of ASP / VBScript. I no longer work full-time with ASP, so to ensure the cheat sheet was as helpful as possible, I roped in one Allan Wenham, an excellent ASP / .NET developer, to assist. Thanks Al!
A description of what is on the cheat sheet follows, or if you are impatient, you can go straight to the full size ASP cheat sheet.
Regular Expressions
VBScript has support for regular expressions, for pattern matching and replacements in strings. This section lists the various symbols used in regular expression patterns along with their meanings.
Date Function Arguments
VBScript's date function(s) can take several different arguments, all with their own simple codes (eg Year, Month, Day, Week etc). This section lists these codes and meanings.
Redirect With 301 Header
I appreciate this is a little unusual for a cheat sheet, but I find myself needing this with alarming regularity. VBScript's Response.Redirect function by default sends a "302" header, telling the recipient the page they were looking for has moved temporarily. A "301" header tells the recipient the page has moved permanently - and in SEO terms the ability to send 301 headers is very important. These lines of code are an alternative to Response.Redirect.
Include a File
I had a little space here. A very little space. So 1 line of code that might prove useful has been roped in to fill it - the code you need to include a file.
Function Argument Orders
Function argument orders are possibly the easiest thing in almost any language to forget. This section lists some common functionns with their argument orders.
File Modes
When opening files, you can do so in several different ways, each requiring a different file mode. There are not many, but they are easy to forget - and this section lists the 3 file modes with what they do.
Common LCID Codes
LCID codes are used to determine location-related settings, such as date formats, among other things. Personally I find myself fairly often hunting around for LCID code lists. This section lists the most common LCID codes, for the UK, US, France, Germany and Spain.
Constants
These three sections list several of the constants used in VBScript. The Date, Comparison and String constants seem to be the ones that people most often use and can least often remember offhand.
Methods and Properties
The Request, Response, Session - and so on - objects all have a variety of methods and properties. This section lists methods and properties with each object.
Functions
The functions list contains some of VBScript most used functions, for working with strings, dates, arrays and numbers.
Collections
When accessing, for example, data sent by the user, you will often use Request.Querystring or Request.Form. These are both commonly known as collections, and there are fair few of them at your disposal. This section lists those collections.
Download
So now that you know what it does, please feel free to print out the ASP cheat sheet:
And finally, if you like the cheat sheets, and want to say thanks, please consider buying me something from my Amazon Wishlist. Thankyou very much to those who have already hunted it down and sent me something nice - I'm very grateful!
Please note: If you wish to link to the ASP cheat sheet from elsewhere, please link to this page so others find the description, rather than linking directly to the sheet.

37 Comments
Well, I bumped into your website yesterday and I have to say: it's a real gem! I love these cheat sheets, they're a great help. All the best for the new year.
#1, James, United Kingdom, 1 January 2006. Reply to this.
Thanks, James - and the same to you.
#2, Dave Child, United Kingdom, 1 January 2006. Reply to this.
You spelled "Sheet" wrong in the title :-)
"Cheat Cheet" should be "Cheat <b>S</b>heet"
-Clint
#3, Clint, United States, 7 January 2006. Reply to this.
Whoops! Thanks Clint, all fixed :)
#4, Dave Child, United Kingdom, 7 January 2006. Reply to this.
Can you post the PDF please, I can't stand the blocky PNG print out. Thanks, great work.
#5, Julian Burgess, United Kingdom, 8 March 2006. Reply to this.
Great work on the cheat sheets! ^^,
I was wondering if you would be kind enough to do a VB.NET and C# cheat sheets? After all, web development is advancing and diversifying into many languages now.
#6, Hagen, Indonesia, 24 June 2006. Reply to this.
Wow! Thanks, now I no longer need to rack my brains or hunt stuff down on the internet.
Brilliant!
#7, Katy, United Kingdom, 11 July 2006. Reply to this.
I would like VB.NET and C# cheat sheets too! But thanks for ASP cheat sheet
#8, zafar, Canada, 10 September 2006. Reply to this.
The mode to append is 8 not 3 no? Good luck using it in an exam!
#9, Istvan Pusztai, Canada, 9 October 2006. Reply to this.
Thanks for sharing
*please ignore the url, 'cause i don't have one, i will someday, after learning stuffs from your page. thanks again.
#10, Fadly, Indonesia, 7 December 2006. Reply to this.
it is very helpful.
how can i get hold of vb script to run ASP on my pc? I was told i need vb script ..is it correct? thks
#11, sean, Singapore, 14 December 2006. Reply to this.
Has anyone ever heard of asp.net and vb.net ????
Welcome to the 21st century.
Cheat-sheets should be available by 2009.
#12, Real Programmers, United States, 3 February 2007. Reply to this.
"Real Programmers", lol. How arrogant.
Using .NET for some sites is like using a steamroller to press a shirt. Wrong tool for the job. Sometimes regular old ASP is the best choice for a project.
I did consider doing a cheat sheet for it, but as everything you need is built in to Visual Studio, there doesn't seem to be much of a need. It's on the list of possibles though.
#13, Dave Child, United Kingdom, 4 February 2007. Reply to this.
You rock. I just found the answer to my question on this cheat sheet in 2 seconds. I have been looking at other websites, including Microsoft's, for over a half an hour. Thank you.
#14, cindypsych, United States, 6 March 2007. Reply to this.
i want to use pulp up message box to display my message
#15, joshua, Unknown, 6 September 2007. Reply to this.
@Real Programmers are you dumb for really. ASP should never skip our developer toolbox. you are stupid for real.
very nice Cheat Sheet
#16, Alex, Romania, 12 September 2007. Reply to this.
I prefer small sample ,rather than cheat sheet (summary of syntax only)
#17, 3xxx, Australia, 15 September 2007. Reply to this.
Great to "see" an overview. Thanks.
#18, learner, United States, 20 September 2007. Reply to this.
umm This is is frggin awesome thank you ..:-)
#19, Anonymous Coward, United States, 26 September 2007. Reply to this.
Wake up: vb.net and asp.net are *FAR* better
than old technologies likes vb6 and asp.
When will YOU start using them? In 2011????
#20, I Agree, Unknown, 13 October 2007. Reply to this.
#20: VB.NET is what I work with at the moment and have done for the last couple of years. Do you think that me releasing a cheat sheet almost 2 years ago for a language I am familiar with implies a need to "wake up"?
I still maintain that regular old ASP can be more appropriate for some jobs and sites (especially for people who can't afford Visual Studio). There are people out there maintaining older sites built in ASP - for whom this cheat sheet would still be useful. And don't forget that VBScript is still used extensively in Microsoft products.
As I said above, I thought about doing a .NET cheat sheet, however all the documentation is built in to VS and intellisense removes the need for almost everything that would go on to a cheat sheet. I've had a go at putting one together, but haven't yet been able to make it useful without including stuff that's at your fingertips while developing in .NET anyway.
#21, Dave Child, United Kingdom, 14 October 2007. Reply to this.
I found your fact-sheet while looking for asp+vbscript in google: you're number 1 from over 3 million results!
Unfortunately I never had the chance to use VB.NET professionally, the intellisense and context-sensitive help in Visual Studio is great (in VB6 too!) but I've recently changed my job and this new company uses classic ASP extensively. It's a small company and there doesn't seem much need of migration, so I guess ASP and VBScript will stick around for a while.
This cheat sheet you made some time ago will be put to good use by me (hey, I didn't even know regular expressions were possible!)
Thanks and good luck to you!
#22, reel programmer, Netherlands, 15 October 2007. Reply to this.
When will i start using .Net...um...yeah...2011 should about cover it...FFS waken up...Every business process could be modelled in VB6+SQL2000, without exception...So why this forced upgrade?...Oh...Profit...yeah...Microsoft?s...So buy into it if you like...I suppose you swear by Vista too...DOH
PS. I'm an actively contracting Software Engineer / Solution Provider and I *never* use DOT NET. Ever. Oh, and I am able to work for 4 months, and take the year off:) Stick with DOT NET, sink with the rest of the sheep, or rats.
#23, DOT NET, United Kingdom, 22 January 2008. Reply to this.
classic asp still alive :) .NET? Sorry, i prefer migrate to PHP or Ruby.
#24, baliwebdesigner, Australia, 18 February 2008. Reply to this.
Excellent refernce sheet - i don't have to search in google all the time. Great work
#25, Shawn, United States, 22 March 2008. Reply to this.
I've found that a vbscript can do almost anything that any other programming language can do.
It is not clunky and can be done with a simple text editor.
#26, Mike, United States, 18 April 2008. Reply to this.
Thanks a lot for this preciouuuuus Cheat sheet!
...it will for sure solve many of my on coming problems. ^^
#27, Arctik, United Kingdom, 21 April 2008. Reply to this.
Never seen anything more brief, easy to use as you cheat sheets. I learnt sql css with your css cheat sheet alone. Thanks to you.
#28, Caesar, Uganda, 8 June 2008. Reply to this.
Can you do the same for JScript??
#29, variable, Unknown, 3 July 2008. Reply to this.
Amazing job! I read comments and I'm still using ASP/VBScript.
I build an intranet web site using ASP 5 years ago and maintaining it. I once planned to migrate to .NET but in a small company no need it.
VBScript is very useful not only for ASP but also to VBA for MS excel, word ... Even AutoCAD and some Electronic Tools(Mentor Pads) are using VBScript. I love your job! Thanks.
#30, Isaac, Canada, 31 October 2008. Reply to this.
thanks my friend
#31, Andreas, Germany, 19 June 2009. Reply to this.
That's a really long list of cheat sheets with lots of information I often need and always forget ;-)
#32, Juergen, Germany, 29 June 2009. Reply to this.
Great stuff. I also downloaded your MS SQL cheat sheet. This one is very handy. I find classic asp can often be faster than .net due to low overheads. You can use tricks to limit data display etc Which negates the need for the more paging-friendly ADO of .net.
I have another idea for you for a GREAT cheet sheet. A date-time cheat sheet that covers SQL cast / convert plus the date number codes for different date/time formats for SQL, VBscript, php, etc...
Date and time formats are the hardest things to remember when coding...
#33, Kelticweb, Ireland, 22 September 2009. Reply to this.
Thankyou kind sir for the trouble you have gone to, to produce your cheat sheets.
As I suffer from a memory condition that requires me to reread - relearn even the most repetative tasks on a regular basis, I have found your cheat sheets to be invaluable.
To your health and happiness.
#34, Bloke, Australia, 27 September 2009. Reply to this.
I am in need of a visual basic code for a search button with multi-fields? I would appreciate assistance in regards ASAP.
#35, Thuso, South Africa - Cape Town, 22 October 2009. Reply to this.
I did not knew that there are so many options..
I'm still learning ASP and this will help me a Lot..
Can you share about which software did you use to make these cheatsheets..
#36, Nanjangud, India, 13 November 2009. Reply to this.
Thanks for the cheat sheet Dave. Very useful.
I know this isn't really supposed to be a help forum, but I notice you have links which download the files directly, rather than them opening up in the browser. Probably sounds pretty simple to you, but trying to do that (on a site designed using asp) has me stumped.
If you could maybe explain how to do it? That would be really useful.
Thanks in advance.
#37, James, England, 12 January 2010. Reply to this.