asp.net mvc 4 - MVC 4 javascript not rendering -
i cant seem these (js files) rendered.
layout.cshtml
<!doctype html> <html lang="en"> <head> <meta charset="utf-8" /> <title>@viewbag.title - asp.net mvc application</title> <link href="~/favicon.ico" rel="shortcut icon" type="image/x-icon" /> <meta name="viewport" content="width=device-width" /> @if (issectiondefined("scripts")) { @scripts.render("~/bundles/jquery") @rendersection("scripts", required: true) } @styles.render("~/content/css") @scripts.render("~/bundles/modernizr") </head>
index.cshtml
@section scripts { <script src="@url.content("~/scripts/lib/firebugx.js")" type="text/javascript"></script> <script src="@url.content("~/scripts/lib/jquery-ui-1.8.16.custom.min.js")" type="text/javascript"></script> <script src="@url.content("~/scripts/lib/jquery.event.drag-2.0.min.js")" type="text/javascript"></script> <script src="@url.content("~/scripts/lib/jquery.jsonp-1.1.0.min.js")" type="text/javascript"></script> <script src="@url.content("~/scripts/js/slick.core.js")" type="text/javascript"></script> <script src="@url.content("~/scripts/js/slick.formatters.js")" type="text/javascript"></script> <script src="@url.content("~/scripts/js/slick.editors.js")" type="text/javascript"></script> <script src="@url.content("~/scripts/plugins/slick.rowselectionmodel.js")" type="text/javascript"></script> <script src="@url.content("~/scripts/js/slick.grid.js")" type="text/javascript"></script> <script src="@url.content("~/scripts/js/slick.groupitemmetadataprovider.js")" type="text/javascript"></script> <script src="@url.content("~/scripts/js/slick.dataview.js")" type="text/javascript"></script> <script src="@url.content("~/scripts/")" type="text/javascript"></script> <script src="@url.content("~/scripts/jqgrid/js/jquery.jqgrid.min.js")" type="text/javascript"></script> <script src="/warehousejavascript.js" type="text/javascript"></script> <script type="text/javascript">
error: failed load resource: server responded status of 404 (not found).
where error occur? page should load. , there's problem line:
<script src="@url.content("~/scripts/")" type="text/javascript"></script>
and make sure warehousejavascript.js not in scripts folder, otherwise have edit line:
<script src="/warehousejavascript.js" type="text/javascript"></script>
Comments
Post a Comment