To enable Visual Studio’s IntelliSense support for jQuery on Razor pages just add the following code line to your view:
@if (false) { }
Note: The if-statement prevents the script tag from being rendered into the html source code.
Unfortunately, with the Razor view engine, there is no central place to add the reference to the vsdoc file, instead you need to add this code line to each view separately to enable the IntelliSense support for jQuery.
2 responses to “Microsoft Visual Studio & ASP.NET MVC 3: Add jQuery IntelliSense support for Razor pages”
Thanks, that was bugging me. Much easier to code with the intellisense in there.
Thanks alot : )