G
Guest
Hi,
I’m creating a cookie named “tick†that should expire after 1 day when user
logs in.
TheDomain = ".www.test.com"
ThePath = "/dir1/subdir"
Response.Cookies("tick")("ID") = Session("userEmail")
Response.Cookies("tick").Expires = DateAdd("d", 1, Now())
Response.Cookies("tick").Domain = TheDomain
Response.Cookies("tick").Path = ThePath
I want to have a logout link. When clicked, I am trying to set the expiry
date of cookie to say 5 days back like this to tell browser that this cookie
has expired and it should remove it.
Response.Cookies("tick").Expires = DateAdd("d", -5, Now())
But I noticed that I am not able to change the cookie’s expiry date by above
line. Can someone tell me what mistake I’m making?
Thanks,
Joe
I’m creating a cookie named “tick†that should expire after 1 day when user
logs in.
TheDomain = ".www.test.com"
ThePath = "/dir1/subdir"
Response.Cookies("tick")("ID") = Session("userEmail")
Response.Cookies("tick").Expires = DateAdd("d", 1, Now())
Response.Cookies("tick").Domain = TheDomain
Response.Cookies("tick").Path = ThePath
I want to have a logout link. When clicked, I am trying to set the expiry
date of cookie to say 5 days back like this to tell browser that this cookie
has expired and it should remove it.
Response.Cookies("tick").Expires = DateAdd("d", -5, Now())
But I noticed that I am not able to change the cookie’s expiry date by above
line. Can someone tell me what mistake I’m making?
Thanks,
Joe