user3026665 user3026665 -4 years ago 217
ASP.NET (C#) Question

asp.net mvc 4 bootstrap

How to add bootstrap to asp.net mvc 4?
I have installed through nudget bootstrap and I have also included in Bundle.config the following:

bundles.Add(new ScriptBundle("~/bundles/knockout").Include(
"~/Scripts/knockout-{version}.js"));
bundles.Add(new StyleBundle("~/Content/css").Include("~/Content/bootstrap.css"));


I have also included

"~/Scripts/bootstrap.js",
"~/Scripts/bootstrap.min.js"


I have also included in Shared _layout the following

@Styles.Render("~/Content/themes/base/css")
@Styles.Render("~/Content/css")
@Scripts.Render("~/bundles/modernizr")

@Scripts.Render("~/bundles/jquery")
@Scripts.Render("~/bundles/knockout")
@Scripts.Render("~/bundles/otf")
@Scripts.Render("~/bundles/knockout")
@RenderSection("scripts", required: false)


The problem is how to make my table in Views/Home/index such as that of bootstrap page.I do include the

<table class="table">
<thead class="thead-inverse">


But it doesn't work

Answer Source

You Can Add The Packages From NUGet Package Manager Which is present in the tools option of Your Visual Studion. Now You Can Add The bootstrap file directly to the View using Script Or Link tags.

<link href="~/Content/Bootstrap.css" rel="stylesheet" type="text/css" /> 

<script src="~/Script/Bootstrap.js"></script>

I did not found any thing good in touching bundle for this.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download