Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [HttpPost]
- public ActionResult Login(LoginViewModel login)
- {
- if (!ModelState.IsValid)
- {
- ViewBag.Error = "Form is not valid; please review and try again.";
- return View("Login");
- }
- if (login.Username == "bpradmin" && login.Password == "admin123")
- FormsAuthentication.RedirectFromLoginPage(login.Username, true);
- ViewBag.Error = "Credentials invalid. Please try again.";
- return View("Login");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement