How to get javascript intellisense when using Url.Content
Say I 开发者_Go百科add a link to jQuery as follows in MVC3
<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:
<script src="../../JS/jq.js" type="text/javascript"></script>
Is there a way around this?
I keep the "real" jquery.min file loaded in my master/_layout page, and then I just throw this up at the top of the child page for jQuery intellisense (razor code):
@if (false) { <script type="text/javascript" src="/Scripts/jquery-1.5-vsdoc.js"></script> }
Unfortunately this feature is not supported. Read Section 4. Which URL-path types does IntelliSense recognize? in this page.
精彩评论