jQuery Intellisense Support in Content Pages
I was trying my hand at whipping up some jQuery today and realising the awesome intellisense that is provided, couldn’t wait to get stuck in. Since I do enjoy adhering to the DRY principle wherever possible I decided I needed to use master pages first before I create my example content. I then set out to try and do a basic hello world example but realized my intellisense wasn’t working with jQuery. It was working with vanilla ASP .NET pages, just not content pages.
It turns out, that VS uses -vsdocs javascript files to provide this support. It requires it to be sitting next to your jquery file that you are referencing. Which it was thanks to the MVC Internet Application project template. It seems that ASP .NET doesn’t know at design time that I’m referencing jQuery in the master page.
After asking Professor Google, I stumbled upon a solution. I decided to slap the following bit of code into any content page that I have created and want some good ol’ intellisense.
<% #if (false) %> <script src="~/scripts/jquery-1.4.4.js" type="text/javascript"></script> <% #endif %>
Yes, this is a bit of hack to get it working and yes, I would like Microsoft to fix it. In the mean time, I will be egarly awaiting the intellisense support to be released for the latest 1.5 version.
UPDATE: I’ve just found that somebody has generated a new vsdoc for jQuery 1.5
UPDATE 2: If you reference your jQuery from the Microsoft CDN, you get intellisense since they also host the vsdoc files. Sadly, the Google CDN does not.

Nice find Drew… but makes me feel so… dirty…
Oh I agree. Maybe you could put it on the page that you are working on but take out the snippet before you check-in?