示例#1
0
        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);
        }
示例#2
0
        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);
        }