Alex Rivera | Logout

ASP.NET MVC How to specify which folder the View pages reside in?

Asked 2009-04-28T21:11:08.663
42

by default the ASP.NET MVC engine searches the following folders for View pages:

  • /Views/{Controller_Name}/{Action}.aspx
  • /Views/Shared/{Action}.aspx

However I want to put some of my View pages like this:

  • /Views/{Namespace}/{Controller_Name}/{Action}.aspx

How can I let the engine look for this?

Edit
Report

1 Answer

8

You have to create a class derived from IViewEngine interface and register this class in Aplication_Start event in Global.asax.cs Check this link text, but there are some differences with 1.0

answered 2009-04-28T21:23:58.757

Your Answer