标签:blog http ar div 问题 sp log on c
string strCookie=""; //创建一个名为user HttpCookie userCookie=new HttpCookie("user"); //value给单个Cookie值赋值 userCookie.Value="nihao"; Response.Cookie.Add(userCookie); //取值 HttpCookie userCookie=Request.Cookie["user"]; strCookie=userCookie.Value; //在一个Cookie中储存多个信息,那也没有问题 //values是获取单个cookie对象键值对的集合 HttpCookie userCookie=new HttpCookie("user"); userCookie.values.Add("nihao",txtName.value); userCookie.values.Add("nihao2",txtName2.value); Response.Cookie.Add(userCookie); //取值 HttpCookie userCookie=Request.Cookie["user"]; cookie1=userCookie.Values["nihao"]; cookie2=userCookie.Values["nihao"];
标签:blog http ar div 问题 sp log on c
原文地址:http://www.cnblogs.com/LIANYUGOOD/p/3964845.html