Reputation: 601
I am novice in MVC. I am just stuck in adding a .cshtml page in View.
I have created a Asp.Net MVC Web Application. When i right click on View folder to add View, it adds a .aspx file as a view rather than a .cshtml file.
should i have to install anything to add a .cshtml file?
Upvotes: 1
Views: 12540
Reputation: 1
Before create .cshtml you must to install ASP.NET. At this page you can by step create .cshtml file: https://visualstudiomagazine.com/articles/2022/05/16/vs2022-web-forms-tip.aspx
Upvotes: 0
Reputation: 77
This answer for visual studio 2022
2.Search "razor" in here. and You can select "Razor View Start"
Upvotes: 0
Reputation: 1224
Razor view engine is only available from MVC version 3, if you are not using this version you cannot use razor view engine. get if from here mvc 3 update for visual studio 2010
Upvotes: 1
Reputation: 1407
I think you didn't select razor view engine while creating project
Upvotes: 1
Reputation: 8765
you can add a view by right clicking on View folder click Add and select View
or right clicking on View folder click Add and select New Item and choose mvc template
Upvotes: 4