Reputation: 30313
How can I delete the cookie in persistent cookie not abandon()?
Upvotes: 1
Views: 635
Reputation: 5576
Just make it expire:
Response.Cookies["cookiename"].Expires = DateTime.Now;
Upvotes: 4
Reputation: 46425
Just send a new cookie with the same name and an expiry in the past, or if you want it to change from persistent to session only, send a new cookie with the same name and no expiry.
Upvotes: 0