views:

41

answers:

1

I can get javascript intellisense going from and aspx or master page ie

<script src="../../Scripts/jquery-1.4.1-vsdoc.js"type="text/javascript"></script>  
<script type="text/javascript">
    $.isFunction( 
</script>  

gives me a drop down in vs2010.

I do all(most) of my js coding inside a js file. How do I get intellisense drop downs inside js files ?

Also, is there a vsdoc for ms ajax (MicrosoftAjax-vsdoc.js) ?

+1  A: 

At the top of your .js file add this:

/// <reference path="jquery-1.4.1.js" />

Or make the path relative, if it's not in the same directory, it'll look for the jquery-1.4.1-vsdoc.js when grabbing it for intellisense, any file you reference like this it'll look for the -vsdoc version if available. As a side note, jQuery 1.4.2 has additional bug fixes you should consider upgrading :)

Nick Craver
Yep, tried this and it worked. Many Thanks. you are a star.
And I also tried yep, well done. At the top of my js file, I put /// <reference path="../MicrosoftAjax/20100604/MicrosoftAjax.debug.js" />Sys.Net.WebServiceError( and then I got intellisense drop downs ...