@{ if (ViewData.TryGetValue("ParentLayout", out var parentLayout)) { Layout = (string)parentLayout; } else { Layout = "/Areas/Identity/Pages/_Layout.cshtml"; } }