Password TextBox control in .NET
Posted on 2015-02-23
What is the proper way to create a password textbox control that is masked with bullet points.
Currently, I created a textbox control, and set itsHtmlTextWriterAttribute.Type property to "password".
writer.AddAttribute(HtmlTextWriterAttribute.Type, "password", true);
writer.AddAttribute(HtmlTextWriterAttribute.Value, text, true);
Everything looks great, except that when you right click on the page and "view source" it actually shows the password in plain text.
For example, the current password in the textbox is "Apple" and is masked.
If the user goes in and deletes the last letter and replaces it with "a", the new password needs to be "Appla". So in other words, the characters need to be real.
How do I achieve this without the password showing up in "view source"?