If I have an ASP textbox in password mode the text I enter is masked, but I would like to have the default text displayed as the word "Password" in the textbox, and when the user start to type in the password it should be masked, is this possible?
Asked
Active
Viewed 1,143 times
1 Answers
0
You should be able to do this with the HTML placeholder
attribute.
HTML
<input type="password" name="fname" placeholder="password">
ASP
<asp:textbox placeholder="password" runat="server" />
For versions of IE before 10, you need to use a placeholder
polyfill to get full support.

Community
- 1
- 1

ashkufaraz
- 5,179
- 6
- 51
- 82
-
1if you need to consider older browsers , check out placeholder polyfills http://stackoverflow.com/questions/15436125/the-best-placeholder-polyfil-script-for-ie7-ie8-and-ie9 – Vishal Sharma Nov 22 '14 at 10:24
-
Thanks that worked fine for chrome and firefox, but for IE I had to add this... https://github.com/UmbraEngineering/Placeholder – MTplus Nov 22 '14 at 10:38