How to create cshtml page in Asp.Net Core

Step:1
Create a new project in visual studio. Select ASP.NET Core(Model, View, Controller) template. Name your project as you want and set your location.
Step:2
Once your project is created the solution will look like as below image:
Here in my case my project name is Matdarshan. You can set all the static files like css, js, img, mail etc within the wwwroot folder.
Step:3
Create a controller by right clicking on controller folder. Select add and then choose controller. Select empty controller and name your controller name. In my case my controller name is Home. Open Home controller. You will see the default action method Index as below image.
Step:4
Build Scalable & Dynamic Web Apps with Razor Pages
Add views to the Index method. Right click in Index action method and select Views. Then choose Razor View and click ok button.
Step:5
Once Views are added the Index view cshtml page will auto created inside the Views folder.


