Dinesh Kumar
asked on
asp.net bundle and minification question
Hi Experts,
in the below code, I am using bundling feature of asp.net, it works well however I am referring the local files, I want to refer the files from some cdn url, how can I do that. There are total of 2 css files and 2 js files which I want to refer from cdn urls.
in the below code, I am using bundling feature of asp.net, it works well however I am referring the local files, I want to refer the files from some cdn url, how can I do that. There are total of 2 css files and 2 js files which I want to refer from cdn urls.
public static class BundleConfig
{
public static void RegisterBundles(BundleCollection bundles)
{
if (bundles != null)
{
var CssBundle = new StyleBundle("~/content/StyleBundle").Include(
"~/content/bootstrap.css",
"~/content/font-awesome.css",
"~/content/toastr.css",
"~/content/ng-grid.css",
"~/content/avb4gjz-d.css",
"~/content/tree-control.css",
"~/content/tree-control-attribute.css");
var JsBundle = new ScriptBundle("~/scripts/JSBundle").Include(
"~/scripts/jquery-{version}.js",
"~/scripts/jquery-migrate-1.2.1.js",
"~/scripts/fastclick.js",
"~/scripts/angular.js",
"~/scripts/angular-tree-control.js");
JsBundle.Transforms.Clear();
bundles.Add(CssBundle);
bundles.Add(JsBundle);
}
}
}
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I tried this: http://www.dotnetjalps.com/2014/07/cdn-in-aspnet-mvc-bundling.html
however it did not work.