Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public ActionResult Login(AccountLog Usr)
- {
- AccountLog personindatabase = db.AccountLogs.FirstOrDefault(m => m.Usercode == Usr.Usercode);
- FormsAuthentication.SetAuthCookie(personindatabase.UserName, true);
- ViewBag.id = personindatabase.Usersid;
- return RedirectToAction("Main", "Main");}
- public ActionResult Main()
- {
- if (Request.IsAuthenticated)
- {
- return View();
- }
- return RedirectToAction("Login", "Account");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement