In my website when the user clicks on the \"Logout\" button, the Logout.aspx page loads with code Session.Clear().
Session.Clear()
In ASP.NET/C#, does this clear all co
Try something like that:
if (Request.Cookies["userId"] != null) { Response.Cookies["userId"].Expires = DateTime.Now.AddDays(-1); }
But it also makes sense to use
Session.Abandon();
besides in many scenarios.