If you are starting with a blank web application, here is how you can customize it:
Firstly, add your desired bootstrap theme or CSS to the Content folder
. Ensure that you keep your Site.css file and simply add the new one without replacing it. You can name your new CSS file something like Bootstrap-MyNewTheme.css.
In the BundleConfig.cs file located in the App_Start folder
, update the CSS bundle to include your new theme:
bundles.Add(new StyleBundle("~/Content/css")
.Include("~/Content/Bootstrap-MyNewTheme.css" //Don't forget to keep site.css
));
Also, don't forget to add your bootstrap JavaScript in the BundleConfig:
bundles.Add(new ScriptBundle("~/bundles/jquery").Include(
"~/Scripts/jquery-{version}.js",
"~/Scripts/bootstrap.js"
));
After making these changes, review your website for any necessary adjustments related to CSS. If this is a new empty web app, you should see an updated bootstrap appearance once these steps are completed.
Remember to make the same modifications in your _Layout.cshtml
file as well.
@Styles.Render("~/Content/css")
@Scripts.Render("~/bundles/jquery")