Hi ,
Cookies
a piece of data stored in the user's browser it can use on store Username & Password so user do not have to re-login to your website every time they visit , Cookies can keep information in the user's browser until deleted or Expired
Defaul1.aspx
protected void Button1_Click(object sender, EventArgs e)
{
HttpCookie Cookies = new HttpCookie("UserName");
Cookies.Value = "your value";
Cookies.Expires = DateTime.Now.AddMinutes(3);
Response.Cookies.Add(Cookies);
Response.Redirect("Default3.aspx");
}
Default3.aspx
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
HttpCookie cookie = Request.Cookies["UserName"];
if (cookie !=null)
{
Label1.Text = cookie.Value;
}
}
}
http://www.aspnettutorials.com/tutorials/network/cookies-csharp.aspx[
^]
Cookies in ASP.NET[
^]
all thing about cookies in asp.net c#[
^]
http://msdn.microsoft.com/en-us/library/ms178194.aspx[
^]
Best Regards
M.Mitwalli