Forms make up a large section of most line-of-business applications; and therefore, applying a uniform style to all forms in your web application is not only visually pleasing but also provides your users with a friendlier interface. Bootstrap provides a range of CSS styles to enable you to create visually appealing forms.
The default create and edit templates for ASP.NET MVC scaffolding generate horizontal-styled Bootstrap forms. This is accomplished by automatically adding the
form-horizontal class name to the
<form> element. In the following code example, a horizontal login form is created using the
Html.BeginForm helper method; this form contains two textboxes and a
@using (Html.BeginForm("Login", ...