I have a page where I am validating a condition. if condition true display different page else displays the login page.
@if (sitemaintainmode == "false")
{
<body>
<div class="navbar navbar-default">
<div class="container">
@Html.Partial("_LoginPartial")
</div>
</div>
<div class="container body-content">
@RenderBody()
</div>
@Html.Partial("_Footer")
</script>
</body>
}
else
{
@RenderPage("~/Views/Account/Error.cshtml");
}
But it gives me an error -
The "RenderBody" method has not been called for layout page "~/Views/Shared/_Layout.cshtml".