public ActionResult DelExp(int id) { if (Session["EmpID"] != null) { Experience exp = new Experience() { ExperienceId = id, EmployeeId = Convert.ToInt32(Session["EmpId"]) }; exp.DeleteExp(); return(RedirectToAction("Index")); } else { return(RedirectToAction("Index", "LogIn")); } }