Skip to content

Instantly share code, notes, and snippets.

@surrealist
Created September 6, 2012 02:49
Show Gist options
  • Save surrealist/3650262 to your computer and use it in GitHub Desktop.
Save surrealist/3650262 to your computer and use it in GitHub Desktop.
Bootstrap on MVC4 - 1. BundleConfig.cs
/*
How to apply Bootstrap 2.1.0.1 to ASP.NET MVC 4
0. Install Twitter.Bootstrap by NuGet to your ASP.NET MVC 4 project.
Update following files:
1. ~/App_Start/BundleConfig.cs
2. ~/Views/Shared/_Layout.cshtml
3. ~/Views/Shared/_LoginPartial.cshtml
4. ~/Views/Home/Index.cshtml
*/
// add these lines to RegisterBundles method:
public class BundleConfig {
public static void RegisterBundles(BundleCollection bundles) {
// ...
bundles.Add(new ScriptBundle("~/bundles/bootstrap")
.Include("~/Scripts/bootstrap.js"));
bundles.Add(new StyleBundle("~/Content/bootstrap/css")
.Include("~/Content/bootstrap.css")
.Include("~/Content/bootstrap-responsive.css"));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment