user1860934
user1860934

Reputation: 427

How to add MVC 5 View Page with (Layout Razor) on Visual studio 2013

I started to learn ASP.NET and according this tutorial i need to add Add, then click MVC 5 View Page with (Layout Razor):

enter image description here

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:

enter image description here

Upvotes: 2

Views: 9364

Answers (5)

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

haydar M.Al-samawe
haydar M.Al-samawe

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

Nicklas Pouey-Winger
Nicklas Pouey-Winger

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

John H
John H

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

David L
David L

Reputation: 33833

You're right clicking on Models instead of Views. Try right clicking on Views if you need View add options.

Upvotes: 6

Related Questions