tags:

views:

163

answers:

1

I know how to make the intellisense work in a .js file using this "/// <reference path="jquery-1.3.2-vsdoc.js" />" but how to make it work in an aspx file.

I writing some jquery code in the page html itself and want to make the intellisense work there

+7  A: 

It should work as long as you have the script reference in you aspx page, and VS can find that file in the path you specify.

<script src="jquery-1.3.2.js" type="text/javascript"></script>

That said, best practice would be to avoid putting javascript in the page itself. Create a separate .js file to contain all of your javascript.

Geoff
but seams the 2 files must have the same name "jquery-1.3.2.js" and "jquery-1.3.2-vsdoc.js" to work
Amr ElGarhy
yes, that is true. the vsdoc feature seems a bit hacky to me. All VS does is look for a file with the same name as your .js file, but with -vsdoc at the end of the filename (before the .js). This means you can create your own vsdoc files for your own intellisense.
Geoff