我在Web服务器中加载了ASP.NET MVC项目,但不幸的是,我的CSS和JS参考均未加载。我在defaultlayout中的一些参考如下:
<head>
<link href="/Scripts/css/bootstrap.min.css" rel="stylesheet">
<link href="/Scripts/css/style.css" rel="stylesheet">
<link href="/Scripts/css/responsive.css" rel="stylesheet">
<link href="/Scripts/css/menu.css" rel="stylesheet">
<link href="/Scripts/css/animate.min.css" rel="stylesheet">
<link href="/Scripts/css/icon_fonts/css/all_icons_min.css" rel="stylesheet">
<link href="/Scripts/css/skins/square/grey.css" rel="stylesheet">
<link href="/Scripts/css/custom.css" rel="stylesheet">
<script src="/Scripts/js/modernizr.js"></script>
<link href="/Content/css/bootstrap-rtl.min.css" rel="stylesheet" />
<link href="/Scripts/Chosen/chosen.min.css" rel="stylesheet" />
<link href="/Scripts/css/mycss.css" rel="stylesheet" />
</head>
<body>
<main>
<div id="form_container">
<div class="row">
<div class="col-lg-12">
<div id="wizard_container">
<div id="top-wizard">
<div id="progressbar"></div>
</div>
@RenderBody()
</div>
</div>
</div>
</div>
</main>
<script src="/Content/js/jquery.min.js"></script>
<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
<script src="/Scripts/js/common_scripts_min.js"></script>
<script src="/Scripts/js/registration_wizard_func.js"></script>
<script src="/Scripts/js/velocity.min.js"></script>
<script src="/Scripts/js/main.js"></script>
<script src="/Scripts/js/functions.js"></script>
<script src="/Scripts/jquery.validate.min.js"></script>
<script src="/Scripts/jquery.validate.unobtrusive.min.js"></script>
<script src="/Content/js/jquery.unobtrusive-ajax.min.js"></script>
@RenderSection("Scripts", false)
<script src="/Scripts/Chosen/chosen.jquery.min.js"></script>
</body>
我该如何解决此问题。任何帮助将不胜感激!
最佳答案
只需将~
添加到源代码的开头。
范例:
<script src="~/Scripts/js/common_scripts_min.js"></script>