@try { @Html.Partial("~/Views/Shared/header.cshtml") } catch (InvalidOperationException) { } @Html.Partial("~/Views/Shared/_LoginDialog.cshtml") @RenderBody() @Scripts.Render("~/bundles/js/viewModels") @RenderSection("scripts", required: false) @{ Boolean footerExists = true; try { @Html.Partial("~/Views/Shared/footer.cshtml") } catch (InvalidOperationException) { footerExists = false; } if (footerExists) {
} }