On user's request:
so here's how to use cookies
{
HttpCookie sName = new HttpCookie("Name");
sName.Value = txtName.Text;
Response.Cookies.Add(sName);
Response.Redirect("default2.aspx");
}
we create a cookie named "sName". Since one cookie instance can hold many values, we tell the compiler that this cookie will hold "Name" value.
here's how to call it in default2.aspx
if (Request.Cookies["Name"] != null )
Label3.Text = Request.Cookies["Name"].Value;
Application state
Application["Name"] = txtName.Text;
Response.Redirect("Default2.aspx");
if( Application["Name"] != null )
Label3.Text = Application["Name"].ToString();
:)