I'm creating a login page. I want to create ASP.NET TextBox controls that have "Username" and "Password" as their Text, but as soon as they receive focus, these words should disappear and whatever the user types should appear, just like normal textbox. If the user leaves it blank and tabs to the next textbox, then these words appear again. This will eliminate the need for having separate labels in front of the text boxes. I would appreciate if someone can share their expertise for doing this.
A:
Google "ASP.NET Watermark textbox". Theres a ton of implemnentations
mattlant
2008-09-23 00:00:54
Thank you. I didn't know the keyword "watermark" to search for.
Shankar
2008-09-23 00:03:16
+9
A:
Use the TextBox Watermark Extender that's in Microsoft's AJAX Toolkit.
phloopy
2008-09-23 00:02:13
No problem. Any reason you unaccepted this answer? It seems a bit more helpful than a suggestion of what to google :p
phloopy
2008-09-23 18:09:07
Well, The thing is that googling helps more than a direct answer, as I knew very well that it would lead to what you suggested. Choice is KEY!
mattlant
2008-09-23 22:22:13
If google helps more than the answers provided here then stack overflow isn't doing its job. Presumably somebody can figure out adequate google queries from solid answers, but knowing an implemntation that has worked well for somebody else is more valuable.
phloopy
2008-09-24 13:50:13