Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MVC3 Multiple Viewstart Pages

Currently I have multiple layouts.

One for my default layout, one for the admin section and one for mobile

Rather than having

@{ Layout = "~/Views/Shared/_Layout.cshtml"; }
in every View, I have a _ViewStart.cshtml in my Views folder with the default layout.

Is it possible to have another _ViewStart.cshtml for instance in my Views/Mobile that changes the layout to my mobile layout for all folders in Views/Mobile

like image 330
jaekie Avatar asked Apr 16 '11 20:04

jaekie


1 Answers

You might find the following blog post useful.

like image 129
Darin Dimitrov Avatar answered Oct 13 '22 05:10

Darin Dimitrov