Reputation: 9
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 success any help appreciated
Upvotes: 0
Views: 1004
Reputation: 218827
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.
Upvotes: 0
Reputation: 12541
You can set the password value by setting its value attribute:
txtpwd.Attributes["value"] = "password";
Upvotes: 2
Reputation: 31
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!
Upvotes: 0