Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // GET: Login
- public ActionResult Login()
- {
- return View();
- }
- [HttpPost]
- public ActionResult Login(string username, string password)
- {
- bool isAuthenticated = PCSSession.Current.AuthenticateUser(username, password);
- if(isAuthenticated)
- {
- return RedirectToAction("Landing","Start");
- }
- else
- {
- return RedirectToAction("Login", "Login");
- }
- }
- <script>
- $("#btnLogin").click(function () {
- $.post("/Login/Login",
- {
- username: $('#Username').val(),
- password: $('#Password').val(),
- },
- function (data) {
- if (data == "True") {
- } else {
- }
- });
- });
Add Comment
Please, Sign In to add comment