HttpCookie cookie = new HttpCookie("guid"); //创建
cookie.Values["id"] = “123456789”; //将“123456789”写入id
HttpContext.Current.Response.AppendCookie(cookie); //保存
HttpCookie cookie = HttpContext.Current.Request.Cookies[“guid”]; //读取
string id = cookie.Values["id"].ToString(); //id="123456789"
cookie.Expires 可以设置过期时间,一般不进行设置默认关闭浏览器后失效