开发者

Password field is not populated

i have password textbox in that when user click on remeber me i want to populate name and password in respective textboxes only name is getting populated not password i am storing name and password in cookies

i set textmode as password of textbox also i have forms authentication i also tried

txtpwd.Attributes.Add(value,txtpwd.text)

but no succes开发者_开发问答s any help appreciated


You can set the password value by setting its value attribute:

txtpwd.Attributes["value"] = "password";


You can't pre-populate a into a password field... and for good reason!

You should either remember that they chose to "Remember Me" and log them in automatically or leave remembering credentials to the browser!


This sounds like a by-design security feature. "Remember me" is a matter for setting a cookie, not for rendering a password in plain text in the HTML being delivered to the client. Never "show" a password.

Edit: In fact, you shouldn't even have the actual password to render. If you're storing passwords in plain text, please do the world a favor and stop it. One-way hashing is the only way to go for storing passwords.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜