Update: Now with ASP.NET MVC5 you don't need to install twitter bootstrap nuget package now its by default available with default template.
In this blog I am going explain how we are going integrate Twitter Bootstrap library with ASP.Net MVC.
What is Twitter bootstrap:
Twitter Bootstrap is open source library created by Twitter. As per twitter it’s Sleek, intuitive, and powerful front-end framework for faster and easier web development. It’s full featured framework for creating web sites. It includes CSS framework, JavaScript, JavaScript plug-ins,typography, Html scaffolding. There are lots of themes also available that are available so you can use that right away.Integrating Twitter bootstrap with ASP.Net MVC:
Earlier we have to manually integrate Twitter bootstrap into the ASP.NET MVC like here. But now We have Twitter.Bootstrap.MVC4 Nuget packages that saves lots of time to adding bootstrap to MVC4 template. It’s very easily combines bootstrap into ASP.NET MVC application thanks to it’s authors Matt Hinze and Eric Hexter.As per Eric Hexter It’s provide following features.
- JS and CSS bundling/minification of Twitter Bootstrap files the MVC4 way
- Incorporate a jQuery validation fix to work with the bootstrap javascript
- Razor Layout templates using Twitter Bootstrap markup.
- Menus using Navigation Routes, including submenus and hiding menus by context(logged in vs anonymous)
- Runtime Scaffolding – default Index, Edit and Detail views.. You provide thePOCOs and we will render the CRUDviews.
- Post Redirect Getsupport using the Bootstrap Alert styles.
- A Sample to show how to use all of this stuff