谢谢.
试试这个删除你的cookies:
public void DeleteCookie(string name) { DateTime now = DateTime.UtcNow; string cookieKey = name; var cookie = new HttpCookie(cookieKey,null) { Expires = now.AddDays(-1) }; HttpContext.Response.Cookies.Set(cookie); }
用法:
DeleteCookie("__ControllerTempData");