public ActionResult ChangeName(Member member) { if (memberSQL.CheckForNameCase(member.DisplayName)) { ModelState.AddModelError("changename-error", "That name already exists"); return(RedirectToAction("OwnInfo")); } memberSQL.ChangeName(member.DisplayName, member.ID); Session["member"] = memberSQL.GetMemberByID(member.ID); TempData["msg"] = "name_changed"; return(RedirectToAction("OwnInfo")); }