O'Reilly logo

Bootstrap for ASP.NET MVC by Pieter van der Westhuizen

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using the TwitterBootstrapMVC helpers

The TwitterBootstrapMVC library offers a wide range of Bootstrap helpers, all of whom use a fluent syntax to allow the chaining of methods. These helpers can reduce the amount of HTML markup you need to create the Bootstrap components. Method chaining in the library follows the following pattern:

@Html.Bootstrap().TextBoxFor(m => m.PostalCode).Value("1.23").Size(InputSize.Large).Placeholder("Enter Postal Code").Format("{0:0.00}").Prepend("US")

Forms and inputs

TwitterBootstrapMVC offers fluent helpers for most forms and input elements.

Inputs

TwitterBootstrapMVC supplies ASP.NET MVC helpers for all HTML input elements; most of these components share the same chaining methods. These methods are listed in the following ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required