public ActionResult Nav() { var action = ControllerContext.ParentActionViewContext.RouteData.Values["action"] as string; if (action == null) action = ""; var vm = new NavigationViewModel { Action = action }; return PartialView("Nav", vm); }
public ActionResult Nav() { var area = ControllerContext.ParentActionViewContext.RouteData.DataTokens["area"] as string; if (area == null || area == "") area = ""; var vm = new NavigationViewModel() { Admin = _currentUser.IsInRole("Admin"), Area = area }; return PartialView("Nav", vm); }