Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using CRUDOperationAJAX.Models;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Web;
- using System.Web.Mvc;
- namespace CRUDOperationAJAX.Controllers
- {
- public class LogInController : Controller
- {
- // GET: LogIn
- public ActionResult Index()
- {
- return View();
- }
- [HttpPost]
- public ActionResult Index(string UserName, string Password)
- {
- UserDB usrDB = new UserDB();
- var chk = usrDB.ListAll().Where(x => x.UserName == UserName && x.Password == Password).FirstOrDefault();
- if (chk != null)
- return Redirect("Home");
- else
- return View();
- }
- public ActionResult IndexUser()
- {
- return View();
- }
- }
- }
Add Comment
Please, Sign In to add comment