protected void Page_Load(object sender, EventArgs e)
{
if (Request.Cookies["hh"] != null)
{
HttpCookie hc = Request.Cookies["hh"] as HttpCookie;
Response.Write("Name=" +hc.Values["name"].ToString()+"<br>Age="+hc.Values["age"].ToString());
}
}
protected void Button1_Click(object sender, EventArgs e)
{
HttpCookie hc = new HttpCookie("hh");
hc.Values["name"] = "jn";
hc.Values["age"] = "2";
HttpContext.Current.Response.AppendCookie(hc);
Response.Redirect("ttt.aspx", false);
}