Boostrap in MVC - Johnson-TONG/CreditCard-Service GitHub Wiki

Under Folder App_Start of your web application add two bootstrap elements, the bootstrap.css for css file, under content and one for the js file bootstrap.js under scripts folder.

Inside BundleConfig.cs under App_Start folder add the codes below inside RegisterBundles function:

            bundles.Add(new ScriptBundle("~/bundles/bootstrap").Include(
                      "~/Scripts/bootstrap.js",
                      "~/Scripts/respond.js"));

            bundles.Add(new StyleBundle("~/Content/<b>css</b>").Include(
                      "~/Content/bootstrap.css",
                      "~/Content/site.css"));

Open the _Layout.cshtml file in Views >> Shared folder. From the <head>….</head> section, remove the styles sheet and the script renders. Add Style Render for both the Bootstrap minimized style sheet (Styles.Render(“~/Content/css”)  below the tag.

    <head>
        <meta charset="utf-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <title>@ViewBag.Title - Credit Card Service Application</title>
        @Styles.Render("~/Content/css")        
    </head>
⚠️ **GitHub.com Fallback** ⚠️