Created
September 6, 2012 02:49
-
-
Save surrealist/3650262 to your computer and use it in GitHub Desktop.
Bootstrap on MVC4 - 1. BundleConfig.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
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