Ramco Ramco

Ramco Ramco

  • 442
  • 3.4k
  • 516.9k

How to use Bundles in MVC

Jul 31 2021 10:47 AM

Hi

  I have below Bundles . How to use them in Layout file

public static void RegisterBundles(BundleCollection bundles)
        {
            bundles.Add(new StyleBundle("~/content/css").Include(
                        "~/components/bootstrap/dist/css/bootstrap.css",
                        "~/components/BootstrapValidator/dist/css/bootstrapValidator.min.css",
                        "~/components/font-awesome/css/font-awesome.css",
                        "~/components/datatables.net-bs/css/dataTables.bootstrap.css",
                        "~/dist/css/skins/_all-skins.css",
                        "~/components/Site.css"));
            bundles.Add(new ScriptBundle("~/bundles/jquery").Include(
                        "~/components/jquery/dist/jquery-2.1.1.min.js",
                        "~/components/bootstrap/dist/js/bootstrap.min.js",
                        "~/components/BootstrapValidator/dist/js/bootstrapValidator.min.js",
                        "~/components/jquery/dist/jquery.validate.min.js",
                        "~/components/jquery/dist/jquery.validate.unobtrusive.min.js",
                        "~/components/datatables.net/js/jquery.dataTables.min.js",
                        "~/components/datatables.net-bs/js/dataTables.bootstrap.min.js"));

}

Thanks

 


Answers (3)