使用cookie保存中文的时候 再读取会出现乱码, 需要保存使用 HttpUtility.UrlDecode() , HttpUtility.UrlEncode()方法 编码再解码一下
写入的时候编码
HttpCookie cookie1 = new HttpCookie("name",HttpUtility.UrlEncode(name,System.Text.Encoding.UTF8));
读取的时候解码
string name = Request.Cookies["name"].Value;
name = HttpUtility.UrlDecode(name, System.Text.Encoding.UTF8);