protected void Page_Load(object sender, EventArgs e) { if (Session["user"] == null) { if (Request.Cookies.Get("user") != null) { HttpCookie cookie = Request.Cookies.Get("user"); int id = int.Parse(cookie.Value); EventIDEntities db = new EventIDEntities(); User u = UserRepo.SearchByID(id); email.Text = u.UserEmail; password.Attributes["value"] = u.UserPassword; remMe.Checked = true; } } }