Method to clear Users Cookie
First we'll get the Cookies's Instance and then set the expiration time of 10 days before the current date. this way the cookie will be expired.
public static void ClearCookies()
{
if (HttpContext.Current.Request.Cookies["Users"] != null)
{
HttpCookie aCookie = HttpContext.Current.Request.Cookies["Users"];
aCookie.Expires = DateTime.Now.AddDays(-10);
aCookie.Value = "";
HttpContext.Current.Response.Cookies.Add(aCookie);
}
}