public ActionResult CreatedSession(Session session) { session.UniqueCode = Convert.ToInt32(Session["UCode"]); if (sessionlogic.DeleteTempSession(session.UniqueCode) != false) { return(RedirectToAction("Index")); } else { ModelState.AddModelError("", "Some problem occurred"); } return(View()); }