Back in October of last year Microsoft released Visual Studio 2008 SP1 which fixed intellisense support for several javascript libraries, including JQuery. In order to use this with jQuery though, it was necessary to download a seperate jQuery intellisense file and add references to it. If you wanted the intellisense in a js file, you’d reference it using a standard js reference like this:
/// <reference path="MyIntellisenseFile.js" />
However, if you needed intellisense in an ASP.Net page, you needed to add the reference to the intellisense file in a server tag that would prevent it from being sent to the client, usually by wrapping the script reference tag like this:
<% if(false) { %>
<script src="MyIntellisenseFile.js" type="text/javascript"></script>
<% } %>
Unbeknowst to me, Last November the VS Web Tools team released a hotfix to VS 2008 SP1 that alleviates a lot of this trouble. Now all you have to do is just reference the jQuery library and have the intelisense file in the same directory following the naming convention of filename-vsdoc.js (e.g. if your jQuery file is named jQuery.js, your intellisense file would be named jQuery-vsdoc.js) and Visual Studio will automatically find the file and provide you with intellisense support. No more conditional ASP.Net server tags. Woo! The VS 2008 hotfix is currently available on the MSDN Code Gallery.
If you’re looking for the official Visual Studio intellisense file for jQuery, you can grab it from the jQuery downloads page (It’s found in the Current Release section). Thanks to Joe Healy for pointing out to me that there was an official version.