
On the Download page, scroll down a bit until the title “ Compiled CSS and JS “, then click the Download button again To download the Bootstrap file, please open the official Bootstrap website at, then click the Download button in the middle of the page. The term “bootstrap installation” is actually not quite right, because Bootstrap only consists of a collection of CSS and JavaScript files that you just need to download and copy. Still, we need a way to input Bootstrap files, and this is what we’ll cover.Īt the time I wrote this tutorial, Bootstrap had just released an update to version 5.3. In my previous article, I discussed the history and some alternatives to the Bootstrap CSS framework. Also, the new Html.EnumDropDownListFor helper method makes it much easier to work with enum data type properties in your ASP.NET MVC views.Continuing the tutorial on learning the Bootstrap CSS framework, this time we will discuss how to download and install Bootstrap 5. In addition, Visual Studio 2013 ASP.NET MVC scaffolding has been improved to generate Bootstrap-friendly layouts and provides the flexibility to easily update your existing layouts through the updated Html.EditorFor and Html.EditorForModel templates. Finished Create FormĪs you can see, ASP.NET MVC 5.1 has some nice new HTML helper classes to make it easier to lay out your forms. Figure 2 shows the completed Create form. I still prefer the scaffold-generated code, though, because it uses the Bootstrap form-group and column-spacing classes to give a better overall layout.Īnother new addition is ASP.NET MVC 5.1 is the Html.EnumDropDownListFor helper method that will generate a bound dropdown list for the given enum-based property. When you use EditorForModel and pass the htmlAttributes they'll be applied to all input and select controls in model. Listing 1 shows the completed PersonModel class. Next, add Id, FirstName, LastName, and Email properties to the class, as well as a Key attribute to the Id column. Then, add a PersonType enum to the PersonModel class with Client and Employee members. Next, create a PersonModel class under the Models directory in the solution.

For the sample I'll be using Entity Framework Code First to set up a basic Create, Read, Update, Delete (CRUD) screen for Person table records. To get started, create a new ASP.NET MVC App from Visual Studio 2013. In this second article in a series on ASP.NET MVC 5.1, I'll cover the new HTML helpers that are included that ease Bootstrap integration, as well as enum data type binding.

Last time I looked at new attribute routing options in ASP.NET MVC 5.1.
