手动添加Cookie
Controller设置Cookie第一种方式:
写:Response.SetCookie(new HttpCookie("mycookie"){ Value="1234" });
读:Request.Cookies["mycookie"].Value;
Controller设置Cookie第二种方式:
写:Response.Cookies.Add(new HttpCookie("Customer") { Value = Server.UrlEncode(source.Result.Data), Expires = DateTime.Now.AddDays(300) });
读:string customer = Server.UrlDecode(Request.Cookies["Customer"].Value);