In a current project I have an area and in this area's Views
folder there's a file called _ViewStart.cshtml
. Its Layout
property points to the application level _Layout.cshtml
file that's within the ApplicationName/Views/Shared
folder.
_ViewStart.cshtml
@{
Layout = "~/Views/Shared/_Layout.cshtml";
}
Doing this you can share a common _Layout.cshtml
file with all or only some of your Areas.
For more info about the _ViewStart.cshtml
file be sure to check this answer: