http://jalpesh.blogspot.com/2010/02/delete-all-cookies-and-session-and

added by jalpesh
2/20/2010 1:40:52 PM

0 Kicks, 54 Views

Cookies are one of most important features of web application. From where we store little information on client side in one of my project we need to delete all cookies and as you can not delete cookies from server side so we have to expire them manually. Here is the code for that. string[] myCookies = Request.Cookies.AllKeys; foreach (string cookie in myCookies) { Response.Cookies[cookie].Expires = DateTime.Now.AddDays(-1); } Same way we can delete all session for following code....


0 comments