What is the correct way to reference Javascript in ASP.NET MVC? Using something like ../../Scripts/Myscript.js seems to work fine for routes that are the traditional {contro
I've created my own HtmlHelper extensions that look like:
public static string MEScriptBlock(this HtmlHelper html, string path, string releasePath)
{
#if DEBUG
#else
if (!string.IsNullOrEmpty(releasePath))
path = releasePath;
#endif
return string.Format("\r\n",
path);
}
If intellisense is what you're after you could trick VS into thinking that a JS file has been loaded... E.g.
<% if (false)
{ %>
<% } %>
HTHs, Charles