public ActionResult UsersWidget() { var model = new UsersWidgetModel { Users = userRepo.UserOptions }; return(PartialView("Widgets/UsersWidget", model)); }
public ActionResult UsersWidget(UsersWidgetModel model, string commandbutton) { switch (commandbutton) { case "Delete": return(RedirectToAction("DeleteUser", "Admin", new { userId = model.SelectedItem })); case "Edit": return(RedirectToAction("EditUser", "Admin", new { userId = model.SelectedItem })); } return(RedirectToAction("Index", "Admin")); }