创建
复制代码代码如下:
HttpCookie cookies = new HttpCookie("validate");
cookies["validate"] = validateNum;
Response.AppendCookie(cookies);
获取
复制代码代码如下:
if (context.Request.Cookies["validate"] != null)
{
validate = context.Request.Cookies["validate"].Value.ToString();
}
测试可用!