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.
Technorati Tags: Cookeis,ASP.NET,C#.NET,DotNetJaps