Wednesday, October 30, 2013

coockies 2

try
        {
            HttpCookie anvesh = new HttpCookie("anvesh");
            anvesh.Value = TextBox1.Text;
            anvesh.Expires = DateTime.Now.AddMinutes(0.1);
            Response.Cookies.Add(anvesh);
       

        }
        catch
        {

        }










TextBox1.Text = "";
            try
        {
            TextBox1.Text = Request.Cookies["anvesh"].Value;
        }
        catch
        {
            Response.Write("coockie expired");
        }

No comments:

Post a Comment