110,539
社区成员
发帖
与我相关
我的任务
分享
HttpCookie cookie = new HttpCookie("css");
cookie.Value = c;
cookie.Expires = DateTime.Now.AddDays(30);
Response.Cookies.Add(cookie);
HttpCookie cookie = Request.Cookies["css"];
string css = cookie.Value;
----赋值----
string width = "200";
string height = "300";
HttpCookie cookie = new HttpCookie("FBL");
cookie.Values.Add("width", width);
cookie.Values.Add("height", height);
cookie.Expires = DateTime.Now.AddDays(1);
Response.AppendCookie(cookie);
----取值----
HttpCookie cookie = Request.Cookies["FBL"];
string xwidth = cookie.Values["width"].ToString();
string yheight = cookie.Values["height"].ToString();