public ActionResult DeleteTeam(string user, int teamID) { // ------------------------------------------------------- try { ViewBag.Msg = ""; info.DeleteTeam(user, teamID); //var view = new TeamListVM(user, info); return(RedirectToAction("TeamList", new { user = user })); } catch (Exception ex) { string msg = "An error occurred attempting to delete the team from the database:\r\n" + ex.Message; ViewBag.ErrorMsg = msg; return(View("ErrorView")); //var view = new TeamListVM(user, info); //return RedirectToAction("TeamList", new { user = user }); } }