ASP.NET Coockies
-
Hi I am implementing a program for remember login.I am doing this like this HttpCookie hc1=new HttpCookie("username",Text1.Value); HttpCookie hc2=new HttpCookie("password",Text2.Value); Response.Cookies.Add(hc1); Response.Cookies.Add(hc2); And i want to show these values in the textboxes by this if(Request.Cookies["username"]!=null) Text1.Value=Request.Cookies["username"].Value; if(Request.Cookies["password"]!=null) Text2.Value=Request.Cookies["password"].Value; but the value in the password text box does not appear. is it possible to show the password in the textbox in the form of ' * ' . Alok Kumar
-
Hi I am implementing a program for remember login.I am doing this like this HttpCookie hc1=new HttpCookie("username",Text1.Value); HttpCookie hc2=new HttpCookie("password",Text2.Value); Response.Cookies.Add(hc1); Response.Cookies.Add(hc2); And i want to show these values in the textboxes by this if(Request.Cookies["username"]!=null) Text1.Value=Request.Cookies["username"].Value; if(Request.Cookies["password"]!=null) Text2.Value=Request.Cookies["password"].Value; but the value in the password text box does not appear. is it possible to show the password in the textbox in the form of ' * ' . Alok Kumar
Hi there, The TextBox control having the
TextMode
property set toPassword
renders as an input password element at the client side. The value of this emelent is always set to null by default, so to work around this thing you need to do two things: + Add the password value to the Response.Cookies collection at the server side. + Use the client side script to read the password value from the cookie, and it should be running on the client machine, not the server.