tags:

views:

229

answers:

1

The code given below is to check the username n display the password via cookie. It works perfectly allright. since i want the value displayed in the password.text to be masked, i changed the textmode of the password.text to 'password'. as a result value isnt passed to the textbox.

how can i solve this issue?

       String cookiename = TextBox1.Text;

        //grab cookie
        HttpCookie cookie = Request.Cookies[cookiename];

        //exists?
        if (null == cookie)
        {
            Label1.Text = "cookie not found";
        }
        else 
        { 
            password.Text=cookie.Value.ToString();

        }

thank you,

A: 

TextBox2.Attributes.Add("value", cookie.Value.ToString());

pier