0
我是一名新的ASP.NET开发人员,我尝试使用捆绑功能ASP.NET 4.5的最大功能之一。它似乎有一些使用CDN的支持。我现在正在使用Bundling获取bootstrap 3.2.0。 那么我该怎么做?如何使用ASP.NET 4.5 Bundling和CDN来获取Bootstrap 3.2?
这里是我的代码片段:当BundleTable.EnableOptimizations配置是真实
public static void RegisterBundles(BundleCollection bundles)
{
bundles.UseCdn = true; //enable CDN support
//add link to jquery on the CDN
var cssCdnPath = "http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css";
bundles.Add(new StyleBundle("~/bundles/css",
cssCdnPath).Include(
"~/Assets/css/bootstrap-{version}.css"));
}