Download Microsoft AJAX Library Cheat Sheets!

Posted on January 09, 2007  |  

Posted in Development


As promised, I’ve compiled “cheat sheets” for JavaScript base type extensions: Array, Boolean, Date, Error, Number, Object, and String.

It took longer than I anticipated. Documentation is pretty darn good, but I had to work through some inconsistencies, ambiguous wording and incorrect samples. For example, the Date Type Extensions one took the longest. Documentation points to the Standard DateTime Format Strings on MSDN, but the AJAX Library does not support them all. I had to look at the source code and figure out which formats were supported. Same goes for the Number Type Extensions. I’ve made an attempt to write a clear and concise sample where one was missing.


I’ve proofread the cheat sheets numerous times, and, for the sake of brevity, took something out with each iteration. I’d love to hear your feedback, and, as announcements in public transportation in NY go, “If you see something, say something.”

Download here or click the image.

Microsoft AJAX Library cheat sheets

PDF Readers

Jason and James pointed out that the PDFs looked odd in Foxit Reader. Indeed, they do. I bitched about Word as a publishing tool before, but I don’t own a full version of Acrobat, so I used Word 2007 to publish PDFs.

I downloaded Acrobat Reader 8, and I have to say Adobe seems to have gotten their act together. The reader loads fast and without annoying splash screens. Still, I’ll see if I can figure this out.

Moving on

The Type Class is next, and I will probably do one on tracing and debugging. What else in the MS AJAX Library would you like to see dissected into a one-pager?

Update: Users of Foxit Reader, see this follow-up.


on January 10, 2007

Very cool! Thanks a bunch for putting these together (what are you using to create them BTW?).

I just pointed people at them here:



on January 10, 2007

Great job !

Thanks :)

Matt Roberts
on January 10, 2007


Great work. I just thought I'd let you know that for some reason, these pdf's dont seem to work with foxit reader - they have blacked out areas all over the place.


Greg Neilson
on January 10, 2007

These are great. Many thanks for putting these together, it's very very useful and will help a great deal!

on January 10, 2007

they don't work in foxit reader :(

Mohammed E. Credli
on January 10, 2007

Thanks for your efforts guys, the sheets are very interesting and handy. Could also be interesting to attaching sample projects as well.

on January 10, 2007

How about adding some useful MS AJAX specific funtions as well. e.g instead of using document.getElementById("something"), we can now use $get("something").

A list of these kind of methods/fuctions/properties would be useful as well, no?

on January 10, 2007

not readable in foxit reader :(

Eduardo scoz
on January 10, 2007

Hey, great work!!!

I agree with #7, though! Please use AJAX functions instead of the regular javascript ones.
If there's one thing I don't like is that many microsoft tutorials also use the javascript functions, as if the groups that develop the tutorials and the actual framework were not in sync. I know that that's not true, because Scott creates many of those tutorials (and you can't get any closer to the framework than Scott, right?), but it is really strange.

Keep the Cheat sheets coming! :)

on January 10, 2007

Good Job - Thanks.

Keep them coming! :)

Milan Negovan
on January 10, 2007

@ScottGu: Thanks, Scott! I use Word 2007 since it has a free PDF exporter. It seems, though, fonts are embedded in some funky way that Foxit Reader doesn't display them correctly.

@Rachit and Eduardo: Yep, I'll hunt down and list some useful shortcuts and classes (Sys.UI.DomEvent, Sys.UI.DomElement, for example)

on January 10, 2007

milan: try using PrimoPDF print driver and see if that does a better job embedding the fonts, etc.

on January 10, 2007

These are great, Thanks!

I noticed a slight misspelling in the footer, "Based om Microsoft..."

Mike Weerainghe
on January 10, 2007

These are an excellent resource. If you are using Word to create these, have you tried using XPS format. That would be another option instead of using PDF.

on January 10, 2007

I use the free Cute PDF to make PDFs from anything that will print, it might be an alternative to Office.

Milan Negovan
on January 10, 2007

@Tim: great idea! I installed PrimoPDF, and it does produce something Foxit can view and print. I still don't understand why it rotates a document on its side, which will be annoying for viewing it on the screen. I'll play with it some more.

@Ryan: thanks for pointing it out.

@Mike: I didn't think of it, but it's a great idea, too. Now that XPS is well supported in XP and Vista, it would be interesting to try both XPS and PDF.

on January 10, 2007

Superb Guys! BTW, the AJAX Class Browser @ is probably not news to you; however, may be unknown to others. I thought this would be a good place to repost, because I'm sure this post will experience some significant traffic.

Thanks again,

on January 10, 2007

Thanks! this will come very handy.
Keep the cheat sheets coming!...

Mike Kidder
on January 10, 2007

Milan... If you are still looking into creating PDF's, try giving PDFCreator a try:

I use from Excel and Document Imaging software. Thanks for working on creating these AJAX sheets

on January 11, 2007

Great work
I love it

Sergey P.
on January 11, 2007

Thank you Milan Negovan and thank you ScottGu that you pointed this resource to me.

on January 11, 2007

Thanks! Extremely helpful!
I also spread the word about your work on the local .Net users group ( is in romanian).
Keep on the good work!

on January 11, 2007

Try using the free writer instead of Word. It reads most Word documents perfectly, and has an "Export PDF" choice under the file menu.

Great cheat sheets btw! Thanks!

on January 11, 2007

Milan, Great Job! it helps a lot as quick and easy reference. Thank You So Much

on January 12, 2007

Eh, pa Milane.. Car si!

Rick Strahl
on January 12, 2007

Great idea, Milan!!! Thanks for taking the time to put this up. This will be very 'handy'...

on January 12, 2007

They're up on the wall ;)

on January 12, 2007

String.trimEnd() and String.trimStart() use value.trim() instead of the respective method. It would seem to me like it should be:
var myString = " A string ";
myString = myString.trimEnd();
// myString = " A string"
var myString = " A string ";
myString = myString.trimStart();
// myString = "A string "

on January 18, 2007

Hey, great job!
Thanks a lot.

on January 29, 2007

Great sheets!


Damien Jorgensen - Cardiff
on May 10, 2007

Excellent blog!

Should save me a few hours!

AJAX Developer
on June 12, 2007

Nice info. I noticed the Date type format strings on the AJAX documentation site listed with the Sys.CultureInfo.dateTimeFormat Field. I guess you would really have to search extensively to find everything. And there's a numberFormat too.

on July 17, 2007

Great job !! thanks

on August 4, 2007

Milane, thanks for great work.

Neil Kilbride
on November 16, 2007

Just what the doctor ordered, I've added a link on my blog to here, I'm sure you don't mind :) @

Milan Negovan
on November 16, 2007

Neil, no, I don't mind. :)

on December 27, 2007

Hi Milan,
I know I am late for the party !!!
But, a very good work :)
Please keep it up.

wish you Merry X-Mas and Very Happy New Year ahead....

on March 3, 2008

Thank you!:)

on August 4, 2008

thanks for this

on February 16, 2009

Thanks for what you've done. Great job.

on July 23, 2009

thanx alot.. .. ..

Marc Weber
on January 30, 2010


Thanks for doing the work!

Really nice!!!