Adding a view for the home controller
You need to create a view for the home controller's Index
action in order to test the template. Complete the following steps to accomplish this:
Open the
HomeController.cs
file and, if theHomeController
class does not already contain an Index action method, add it as shown here:Â Â Â Â Â Â Â public IActionResult Index() Â Â Â Â Â Â { Â Â Â Â Â Â return View(); Â Â Â Â Â Â }
Next, right-click on the
Views
\Home
folder and Add | New Item... from the context menu.Select MVC View Page from the list of project items, make sure the name is
Index.cshtml
, and click on Add:Open the newly created
Index.cshtml
file and change its markup to the following:Â Â Â Â Â Â Â <p class="hidden-md-up"> Â Â Â Â Â Â <button type="button" class="btn btn-primary-outline btn-sm" Â Â Â Â Â Â Â data-toggle="offcanvas"><i class="fa fa-chevron-left"></i> Â Â Â Â Â Â Â Â Â Â Â Â Â Menu</button> Â Â Â Â Â Â </p> Â Â Â Â Â Â <h1 class="display-1 hidden-xs-down"> Â Â Â ...