Adding different page views

Next, you'll create a custom view that displays two cards, one with a simple Bootstrap form and another displaying an image, by completing the following steps:

  1. Add a new empty MVC Controller Class called FormsController.cs to the project's Controllers folder.
  2. The new controller class should already contain an Index action method.
  3. Next, add a new folder called Forms inside the Views folder.
  4. Add a new MVC View Page, called Index.cshtml, to the newly created Forms folder.
  5. Add the following markup to the view:
            <div class="row">        <h1>Forms</h1>        <div class="col-md-3">        <form>        <div class="card card-success" style="max-width: 20rem;">        <div class="card-header">        First Panel with simple ...

Get Bootstrap for ASP.NET MVC - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.