3
我想呈現一個腳本包,但它是空的。爲什麼jqueryval包渲染爲空?
下面是BundleConfig.cs
bundles.Add(new ScriptBundle("~/bundles/jquery").Include(
"~/Scripts/jquery-{version}.js"));
bundles.Add(new ScriptBundle("~/bundles/modernizr").Include(
"~/Scripts/modernizr-*"));
bundles.Add(new ScriptBundle("~/bundles/bootstrap").Include(
"~/Scripts/bootstrap.js",
"~/Scripts/respond.js"));
bundles.Add(new ScriptBundle("~/bundles/jqueryval").Include(
"~/jquery.unobtrusive.ajax*",
"~/jquery.validate.unobtrusive.bootstrap*"));
而且在我看來,劇本捆綁申報
@Scripts.Render("~/bundles/jquery")
@Scripts.Render("~/bundles/bootstrap")
@Scripts.Render("~/bundles/modernizr")
@Scripts.Render("~/bundles/jqueryval")
但是當我加載頁面時,jqueryval腳本出現空。
<script src="/bundles/jquery?v=Nsx6sB8o7LJCR51P5u-dfe-6LePnt87pD0P5VTJ-0wI1"></script>
<script src="/bundles/bootstrap?v=XkxfR798CUJPhMhSd0B8VYgZWSNOTtLvz6047jf84wQ1"></script>
<script src="/bundles/modernizr?v=K-FFpFNtIXPUlQamnX3qHX_A5r7TM2xbAgcuEmpm3O41"></script>
<script src="/bundles/jqueryval?v="></script>
Firefox中的調試器說,返回200個狀態檢索捆綁包的文件時,但文件大小爲0
呃。隱藏在衆目睽睽下。謝謝。 – mvanella