@{ switch (ViewData["Layout"]) { case null: Layout = "_Layout"; break; case "SectionScript": Layout = "_PartialScript"; break; } }