I’m using ASP.NET MVC 3 with Razor views. When you want to create a view you can choose a layout (master page) for your view, or leave it to choose Default (_Layout).
I am interesting in to change this layout after create a view without recreate it, is there any where to store the layout information about the views? and how can I change it?
In MVC3 you have
_ViewStart.cshtmlthat stores all pages’ Layout; you can change this element to change all pages’ Layout or you can add new Layout element in top of target view pages in@{}block like the following to change the layout of the specific page: