scriptbundle

ASP.NET MVC Script bundle not rendered

試著忘記壹切 提交于 2019-12-21 04:06:08
问题 I've included the following line in the BundleConfig.cs file: bundles.Add(new ScriptBundle("~/bundles/jqueryajax").Include( "~/Scripts/jquery.unobtrusive-ajax.min.js")); However when I try to render it among other scripts, it's skipped. Here is how I render the scripts: @Scripts.Render( "~/bundles/jquery", "~/bundles/jqueryui", "~/bundles/jqueryajax", "~/bundles/jquerytree") This is the output HTML, the jqueryajax bundle is omitted: <script src="/Scripts/jquery-1.9.1.js"></script> <script src

Is there an easy way to render absolute URLs with Microsoft Web Optimization framework / script bundling?

烈酒焚心 提交于 2019-12-18 21:14:41
问题 I'm trying to render a JavaScript bundle using Microsoft's Web Optimization framework, like this: @Scripts.Render("~/assets/bundle.js") And building a small bundle, like this: public static void RegisterBundles(BundleCollection bundles) { bundles.Add(new ScriptBundle("~/assets/bundle.js") .Include( "~/scripts/jquery-2.1.0.min.js", "~/scripts/somescript.js" )); ... } But when optimizations are on, it only renders a relative URL, like this: <script src="/assets/bundle.js?v

Is there an easy way to render absolute URLs with Microsoft Web Optimization framework / script bundling?

旧城冷巷雨未停 提交于 2019-11-30 18:32:58
I'm trying to render a JavaScript bundle using Microsoft's Web Optimization framework, like this: @Scripts.Render("~/assets/bundle.js") And building a small bundle, like this: public static void RegisterBundles(BundleCollection bundles) { bundles.Add(new ScriptBundle("~/assets/bundle.js") .Include( "~/scripts/jquery-2.1.0.min.js", "~/scripts/somescript.js" )); ... } But when optimizations are on, it only renders a relative URL, like this: <script src="/assets/bundle.js?v=mGDOiNaiTrSfcNq41OoA7A_BcN8PrXuMbfl-TE84HVY1"></script> How can I have script bundling render an absolute URL instead? I