保存Cookie
以保存username 和userPhone为例子
//保存Cookie 方法一
Response.Cookies["username"].Expires = DateTime.Now.AddDays(1.0);
Response.Cookies["username"].Value = this.txtCookie.Text;
//保存Cookie 方法二
HttpCookie cookie = new HttpCookie("userPhone","123456");
cookie.Expires = DateTime.Now.AddDays(1.0);
Response.Cookies.Add(cookie);
读取Cookie
Response.Write($"username={Request.Cookies["username"].Value} userPhone={Request.Cookies["userPhone"].Value}");