>Hi everybody,
>
>It is OK to include into layout.cshtml these lines as is:
>
>
><!-- DataTables CSS -->
><link rel="stylesheet" type="text/css" href="http://ajax.aspnetcdn.com/ajax/jquery.dataTables/1.9.4/css/jquery.dataTables.css">
>
><!-- jQuery -->
><script type="text/javascript" charset="utf8" src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.8.2.min.js"></script>
>
><!-- DataTables -->
><script type="text/javascript" charset="utf8" src="http://ajax.aspnetcdn.com/ajax/jquery.dataTables/1.9.4/jquery.dataTables.min.js"></script>
>
>?
>
>My MVC project is for ASP.NET MVC 4 and they use a concept of bundles. However, as I understand from intellisense help, I need to supply virtual path if I am to use bundle.
>
>
>In other words, this compiles, but I am not sure if this is correct usage:
>
>
> bundles.Add(new ScriptBundle("~/bundles/jquery.dataTables").Include("http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.8.2.min.js","http://ajax.aspnetcdn.com/ajax/jquery.dataTables/1.9.4/jquery.dataTables.min.js"));
>
>
>UPDATE. Working through this blog post now
http://www.tomdupont.net/2012/03/configuring-bundles-in-mvc-4.html>So far I managed to break the already working page, but hopefully will succeed at the end.
>Thanks in advance.
I think you can use BundleCollection.UseCdn which also allows for fallback if the CDN is not available.
See 'Using a CDN' here:
http://www.asp.net/mvc/tutorials/mvc-4/bundling-and-minification