//My BundleConfig.cs look like-
public class BundleConfig
{
public static void RegisterBundles(BundleCollection bundles)
{
bundles.Add(new ScriptBundle("~/bundles/jquery").Include(
"~/Scripts/jquery-{version}.js"));
bundles.Add(new ScriptBundle("~/bundles/jqueryval").Include(
"~/Scripts/jquery.validate*",
"~/Scripts/jquery.unobtrusive*"));
bundles.Add(new ScriptBundle("~/bundles/jqueryUI").Include(
"~/Scripts/jquery-ui.js",
"~/Scripts/CustomAutocomplete.js"));
bundles.Add(new ScriptBundle("~/bundles/modernizr").Include(
"~/Scripts/modernizr-*"));
bundles.Add(new ScriptBundle("~/bundles/bootstrap").Include(
"~/Scripts/bootstrap.js",
"~/Scripts/respond.js",
"~/Scripts/bootstrap-datetimepicker.js"));
bundles.Add(new StyleBundle("~/Content/css").Include(
"~/Content/bootstrap.css",
"~/Content/bootstrap-datetimepicker.css",
"~/Content/site.css",
"~/Content/JqueryUI/jquery-ui.css"));
}
}
//In cshtml file calls like-
@Styles.Render("~/Content/css")
@Scripts.Render("~/bundles/modernizr")
@Scripts.Render("~/bundles/jquery")
@Scripts.Render("~/bundles/bootstrap")
@Scripts.Render("~/bundles/jqueryval")
在visual studio中运行项目时工作正常,但在服务器上部署后,某些css和js文件无法正确加载 我已按照here解释的那样完成了IIS设置 部署网页后看起来像
请提供解决方案......