SyntaxFix
Write A Post
Hire A Developer
Questions
It is 2018 now, so in ASP.NET Core, there is a straight forward built in function. To delete a cookie try this code:
if(Request.Cookies["aa"] != null) { Response.Cookies.Delete("aa"); } return View();