Creating the master layout
You've added the CSS and JavaScript files needed to create the master layout file for your project. Next, you need to create a home controller as well as a master layout file. To do this, complete the following steps:
- Add a new empty controller called
HomeController
to theControllers
folder by right-clicking on it and selecting Add | New Item.... - Select MVC Controllers Class from the list of project items and click on the Add button.
- Next, right-click on the
Views
folder in your project and navigate to Add | New Folder. Name the folderShared
. - Right-click on the newly created
Shared
folder and navigate to Add | New Item... - Select MVC View Layout Page in the list of project items and keep the name of the file as
_Layout.cshtml ...
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.