Customize View, Partial View And Layout Search Locations

ASP.NET stores all the views associated to a controller indie a sub-folder of Views folder by default. This is on the same line partial views and layout pages are stored inside Shared sub-folder under View folder. This default argument works fine; however, in most cases you may want to deviate from the conventional based arrangement and store views, partial views , and a different folder structure. Or in most cases, some application may want to store views outside views folder. In this case, methods like View() , Html.Partial() and PartialView() the system will not be able to find the needed .cshtml files.

You can deal with this situation by creating a custom view engine.

Read the rest of the tutorial here:

Leave a Reply

Your email address will not be published. Required fields are marked *