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"> ...