Setting cookie:
string email="redwan_choyon@yahoo.com";
HttpCookie myCookie = new HttpCookie("UserName");
myCookie.Value=email;
Response.Cookies.Add(myCookie);
Getting cookie:
if (Request.Cookies["UserName"] != null)
{
Label1.Text = Request.Cookies["UserName"].Value;
}
else
{
Label1.Text = "";
//Response.Redirect("login.aspx");
}
About Me
- Redwan
- Dhaka, Bangladesh
- I am B.S.C Engineer,CSE,SUST and Ex-Cadet of Mirzapur Cadet College.
Subscribe to:
Post Comments (Atom)
1 comment:
Sundor hoice!
Post a Comment