ASP.NET MVC Relative Paths

Try this:

<script type="text/javascript" src="https://stackoverflow.com/questions/317315/<%=Url.Content("~/Scripts/jquery-1.2.6.js")%>"></script>

Or use MvcContrib and do this:

<%=Html.ScriptInclude("~/Content/Script/jquery.1.2.6.js")%>

Leave a Comment