public ActionResult Login(AdminLogin Login) { User u = new User(); u.UserEmail = Login.Email; u.UserPwd = Login.Password; if (db.AdminValidate(u)) { Session["AdminEmail"] = Login.Email; return(RedirectToAction("Home", "Admin")); } else { Session["adminerror"] = "Either admin Email or password is incorrect...."; return(RedirectToAction("Login")); } }