[thelist] asp.net: update cookie value to log user out
Casey Crookston
casey at thecrookstons.com
Mon Oct 11 15:05:30 CDT 2004
I. User fills in User ID and Password text box correctly.
II. Cookie is set:
dim login_cookie as HttpCookie = New HttpCookie("loggedIn")
login_cookie.Values.Add("login_correct","yes")
login_cookie.Expires = today.AddDays(1+today.DayOfWeek)
Response.Cookies.Add(login_cookie)
II. Now, user wants to log out, so clicks on the "Log Out" link. What's
the best course of action at this point? Change the value of the cookie to
("login_correct","no")? If so, is there a response.cookies.update method?
Or do you do it all over again?
dim login_cookie as HttpCookie = New HttpCookie("loggedIn")
login_cookie.Values.Add("login_correct","no")
Response.Cookies.Add(login_cookie)
Or is there a better way of doing this?
Thanks,
Casey
More information about the thelist
mailing list