When validating cookies or cookie data from the browser you should use the Request.Cookies collection. 从浏览器验证cookie或cookie数据时,应该使用Request.Cookies集合 When you are constructing cookies to be sent to the browser you need to add them to the Response.Cookies collection. 在构建要发送到浏览器的cookie时,须要将它们添加到Response.Cookies集合中
Cookie does not work in asp.net前端
问题的核心是,在浏览器进行cookie操做而不是在后台
因此须要在前端经过ajax调用操做cookie的方法ajax
Unable to update cookie in ASP.NET
Does modifying the Response.Cookies collection also change Request.Cookies in .Net?浏览器