Do the views need to be in specific folders in order for an ASP.NET MVC project to work properly?

42 Views Asked by At

For an ASP.NET MVC 5 project, is there some kind of priority ranking between views?

And do they need to be in separate folders within the project?

1

There are 1 best solutions below

0
MD Zand On

Although I am answering a year later but I should say "Yes there is!" to your first question. The locations are listed at a string list called ViewLocationFormats in the RazorViewEngin. You can even change the list by inheriting the RazorViewEngine, take a look at here or even changing the existing one So the answer to your second question is that they should be anywhere as long as the containing folder listed in the view locations of the used RazorViewEngine.