//写入cookies时
string jia =HttpUtility.UrlEncode(要写入到cookies的中文值);
HttpCookie c = new HttpCookie("user_realname", jia);
Response.Cookies.Add(c);
//读取cookies时
jia=获取的中文cookies值;
jia= HttpUtility.UrlDecode(teacher_name);
这样就解决了。
string jia =HttpUtility.UrlEncode(要写入到cookies的中文值);
HttpCookie c = new HttpCookie("user_realname", jia);
Response.Cookies.Add(c);
//读取cookies时
jia=获取的中文cookies值;
jia= HttpUtility.UrlDecode(teacher_name);
这样就解决了。