1 - Is it worth using this approach? Why?
When we talk about optimizing websites, we need to take care of every detail that can slow down processing or traffic. Using Bundle allows you to group multiple files into one.
This grouping brings a number of benefits to the economy of bytes , and provides a very efficient way to organize the project.
2 - The same bundles stay within the ScriptManager tag
No. You can use the BundleConfig class located in the App_Start folder and add / declare the files you are going to use, for example:
using System.Web.Optimization;
public class BundleConfig
{
public static void RegisterBundles(BundleCollection bundles)
{
...
bundles.Add(new ScriptBundle("~/bundles/modernizr").Include(
"~/Scripts/modernizr-*"));
...
}
}
Register the Bundle in the Application_Start method:
void Application_Start(object sender, EventArgs e)
{
BundleConfig.RegisterBundles(BundleTable.Bundles);
AuthConfig.RegisterOpenAuth();
}
And add the reference on the page like this:
<asp:PlaceHolder runat="server">
<%: Scripts.Render("~/bundles/modernizr") %>
</asp:PlaceHolder>
3 - Can I continue referencing .css and .js in the old way?
Yes.
References ):