简体   繁体   English

使用Url.Content时如何获取javascript intellisense

[英]How to get javascript intellisense when using Url.Content

Say I add a link to jQuery as follows in MVC3 说我在MVC3中按如下所示添加到jQuery的链接

<script src="@Url.Content("~/Scripts/jq.js")" type="text/javascript"></script>

Now the scripts folder also has the -vsdoc file but I won't get the intellisense unless I add the script file like this: 现在scripts文件夹也有-vsdoc文件,但是除非添加如下脚本文件,否则我不会得到智能感知:

<script src="../../JS/jq.js" type="text/javascript"></script>

Is there a way around this? 有没有解决的办法?

我将“真实的” jquery.min文件保留在我的master / _layout页面中,然后将其放在jQuery intellisense(剃刀代码)的子页面顶部:

@if (false) { <script type="text/javascript" src="/Scripts/jquery-1.5-vsdoc.js"></script> }

Unfortunately this feature is not supported. 不幸的是,不支持此功能。 Read Section 4 . 阅读第4节 Which URL-path types does IntelliSense recognize? IntelliSense可以识别哪些URL路径类型? in this page . 在此页面中

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM