Reputation: 427
I started to learn ASP.NET
and according this tutorial i need to add Add, then click MVC 5 View Page with (Layout Razor):
The thing is that in my Visual studio 2013 i don't have this option of MVC 5 View Page with (Layout Razor)
inside add like in this exapmle.
this is what i have:
Upvotes: 2
Views: 9364
Reputation: 1
Look at this video in youtube: Missing the ASP.NET Web Template option in Visual Studio
For me work: Using the installer from visual studio 2022 por example, Modify > Individual components > Select .NET Framework project and item templates and click Modify, and try again.
Upvotes: 0
Reputation: 291
you can use this way , Rclick on your folder the Add>Newitem in Web you can search for Razor you will find all kind of Razor pages
Upvotes: -1
Reputation: 3023
Right click your Return View()
statement in the appropriate controller, and click Add View
. Should be generated automagically.
By the way, and this is just my opinion, this seemed like a cumbersome way of adding views?
Upvotes: 4
Reputation: 14630
An alternative from David's answer, if it's anything like other versions of Visual Studio, you can also right-click the name of the action in your controller and select Add View...
.
Upvotes: 1
Reputation: 33833
You're right clicking on Models instead of Views. Try right clicking on Views if you need View add options.
Upvotes: 6