public IActionResult SignUpSubmit() { if (String.IsNullOrEmpty(HttpContext.Request.Form["email"].ToString()) || String.IsNullOrEmpty(HttpContext.Request.Form["passwd"].ToString()) && String.IsNullOrEmpty(HttpContext.Request.Form["confirmpasswd"].ToString())) { TempData["message"] = "Please fill all the blanks"; return(RedirectToAction("Index", "SignUp")); } if (HttpContext.Request.Form["passwd"].ToString() != HttpContext.Request.Form["confirmpasswd"].ToString()) { TempData["message"] = "Password and Confirm Password must be the same"; return(RedirectToAction("Index", "SignUp")); } if (DbUsers.SignUpFunc(HttpContext.Request.Form["email"].ToString(), HttpContext.Request.Form["passwd"].ToString(), HttpContext.Request.Form["group"].ToString(), _context) == false) { TempData["message"] = "User already exist"; return(RedirectToAction("Index", "SignUp")); } TempData["message"] = ""; return(RedirectToAction("Index", "SignIn")); }