public ActionResult ProcessPassword(UserType model) { AccessModel mod = new AccessModel(); int UserID = mod.GetUserIDForPassword(model.Email, model.UserName); if (UserID > 0) { string sToken = mod.SetToken(UserID); mod.UserName = model.UserName; mod.UserID = UserID; mod.EMail = model.Email; mod.SendPasswordEmail(UserID, sToken); return(RedirectToAction("index", "home")); } else { mod.ErrorMessage = "Can't find that email or user name"; return(View("Login", model)); } }