I have created a view that should act as a master page(_MasterAccount.cshtml
) with the following code:
<h1>TEST!!!!</h1>
@RenderBody()
<h1>TEST!!!!</h1>
I tried to have another view reference it using the following code:
@{
ViewBag.Title = "My account - Options";
Layout = "~/Views/Shared/_MasterAccount.cshtml";
}
I am using RAZOR and there isn't a _viewstart.cshtml
in the project
For some reason the layout is being ignored. It doesn't even throw an exception when I put in a non existing path.
Please note that there is already a "main" master page and mine is acting as a nested master page for specific set of pages.
The site has been developed by someone else, so I am suspecting that there is a piece of code that is overloading the layout property somehow. Thing is, I don't know where to look.
Please let me know if additional information is required.