Ejemplo n.º 1
0
        public ActionResult Login(FormCollection form)
        {
            string d = form["txtUser"];
            string p = form["txtpass"];

            if (AccountDAO.AccountVerify(d, p))
            {
                HttpCookie userinfo = new HttpCookie("userinfo");
                userinfo["username"] = d;
                userinfo.Expires.Add(new TimeSpan(0, 30, 0));
                Response.Cookies.Add(userinfo);
                return(RedirectToAction("Manage"));
            }
            return(RedirectToAction("index"));
        }