Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Apr 06, 2012 05:59 PM by JohnLocke
Apr 06, 2012 05:50 PM|LINK
I want create 2 _Layout.cshtml. and i want dsiplay some views with _Layout1.cshtml and other views with _Layout2.cshtml
How can i do that?
Apr 06, 2012 05:54 PM|LINK
The view has a Layout property -- you can just assign that to be the layout you want:
Layout = "~/Views/Shared/Layout1.cshtml";
Apr 06, 2012 05:59 PM|LINK
You can also choose the layout from the "Add View" wizard. Toward the bottom there's a "Use a layout or master page" option. You can click the "..." button next to the field and find the layout you want to use for that view.