How do I add Jquery VS intellisense reference to my view in VS 2010

南笙酒味 提交于 2019-12-12 05:58:03

问题


I am trying to get Jquery intellisense working in Visual Studio 2010.

I've looked around on StackOverflow and tried adding this to my view:

@{
     /// <reference path="/Scripts/jquery-1.5.1-vsdoc.js"/>
 }

That's not working.. I've got it working by adding the same script tag to each view but this is less than ideal since i want to keep all my scripts in one place at the bottom of my layout page.


回答1:


Add the <script> tags to each view inside an @if (false) { ... } block.

The IDE will still see them, and provide IntelliSense, but they won't do anything at runtime.



来源:https://stackoverflow.com/questions/6791580/how-do-i-add-jquery-vs-intellisense-reference-to-my-view-in-vs-2010

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!