//设置Cookie页面
protected void btnSetCookie_Click(object sender, EventArgs e)
{
Response.SetCookie(new HttpCookie("Value",CookieValue.Text));//设置Cookie页面
}
//读取Cookie
protected void ReadCookie_Click(object sender, EventArgs e)
{
string name= Request.Cookies["Value"].Value;
CookieValue.Text = name;
}
本文介绍了如何在Web应用程序中使用ASP.NET设置和读取Cookie的基本步骤,包括设置Cookie的方法和读取Cookie的原理。
1213

被折叠的 条评论
为什么被折叠?



