在c#.net中, 创建和读取一个cookies有两个方法, 第一种:
(读):httpcookie cookie = new HttpCookie["aspcn"];
cookie.Value = "飞刀";
Response.AppendCookie(cookie); (取):httpcookie cookie = Request.Cookies["aspcn"];
cookieValue = cookie.Value;
第二种:
(读):HttpCookie bCooke=new HttpCookie("userSvaePwd");
bCooke.Values["userName"]=log.userName;
Response.Cookies["shopsnum"].Value = Cook;
(取)cookieValue = cookie.Value;
哪个方法是正确的? 还是都不太准确? 每句代码都是什么意思?
(读):httpcookie cookie = new HttpCookie["aspcn"];
cookie.Value = "飞刀";
Response.AppendCookie(cookie); (取):httpcookie cookie = Request.Cookies["aspcn"];
cookieValue = cookie.Value;
第二种:
(读):HttpCookie bCooke=new HttpCookie("userSvaePwd");
bCooke.Values["userName"]=log.userName;
Response.Cookies["shopsnum"].Value = Cook;
(取)cookieValue = cookie.Value;
哪个方法是正确的? 还是都不太准确? 每句代码都是什么意思?
name = Request.Cookie["name"].Value.ToString( );的Request.Cookie
这是什么意思?