As developers, we can find it difficult to create great-looking user interfaces from scratch when using HTML and CSS. This is especially hard when developers have years of developing Windows Forms applications experience. Microsoft introduced Web Forms to abstract the complexities of building websites away for Windows Forms developers and to ease the switch from Windows Forms to the Web, this in turn made it very hard for Web Forms developers to switch to ASP.NET MVC and even harder for Windows Forms developers.
Twitter Bootstrap is a set of stylized components, plugins, and a layout grid that takes care of the heavy lifting. Microsoft included Bootstrap in all ASP.NET MVC project templates since 2013. In the sample project, we'll start by creating a new ASP.NET MVC project either by using the standard Visual Studio MVC project template or by starting with an empty MVC project and adding the necessary files as we need them.
In this chapter, we will cover the following topics:
The files included in the Bootstrap distribution
How to create an ASP.NET MVC site using the standard Visual Studio project template and Bootstrap
How to create an empty ASP.NET MVC site and add the Bootstrap files manually
How to create a
Layout
file that references the Bootstrap filesAdding Bootstrap files using NuGet
Improving site performance with bundling and minification