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.
Question: String cookiename = TextBox1.Text;
HttpCookie cookie = Request.Cookies[cookiename];
if (null == cookie)
Label1.Text = "cookie not found";
HttpCookie myCookie = new HttpCookie("MyTestCookie");
myCookie = Request.Cookies["MyTestCookie"];
The answer is just one line. but it saves a lot of time.