To create a view, we first need to create the matching folder if it doesn't already exist, and then create the file. Follow these steps to accomplish that:
- On Solution Explorer, right-click on the project name and choose Add | New Folder.
- Set the name as Views and click Enter.
- Right-click on the newly created Views directory and, again, choose Add | New Folder.
- Set the new folder name as Home and click Enter.
- Right-click on the new Home folder and choose Add | View....
On the Add View dialog, do the following:
- Set the View name as Index.
- Choose Empty (without model) on the Template field.
- Uncheck the Use a layout page checkbox.
- Click Add:
- The new view has now been scaffolded for you.
- Find the <body></body> tags and ...