This is a migrated thread and some comments may be shown as answers.

Having trouble with default text in Password textbox

1 Answer 132 Views
Input
This is a migrated thread and some comments may be shown as answers.
Tad Rhodes
Top achievements
Rank 1
Tad Rhodes asked on 01 Dec 2009, 09:02 PM
My requirement is to have a textbox that is in password mode (password textbox) with the default text of "Password." When typing the text becomes asterisks or dots. And goes back to "Password" when cleared.

There are examples out there that will show/hide 2 textboxes using javascript or jquery that accomplish this.  However I can only get it to work with regular input html fields.

Does someone know of some way (perhaps using telerik's jquery) to get this to work with RadTextBox.

Thanks

1 Answer, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 02 Dec 2009, 09:01 AM
Hi Tad Rhodes,

I am afraid this scenario is currently not supported and is hard to implement manually, because there are quite a lot of event handlers attached to the RadTextBox textbox, which should be switched (reattached) when the user enters or clears the password.

However, there is a relatively simple workaround, demonstrated below. If for some reason you can't  or don't want to use it, I can only suggest you to use a regular asp:TextBox styled with RadFormDecorator (or ordinary CSS styles) to look like a RadTextBox with the same skin.

http://www.telerik.com/community/code-library/aspnet-ajax/input/how-to-use-an-emptymessage-with-password-radtextboxes.aspx

Sincerely yours,
Dimo
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Input
Asked by
Tad Rhodes
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Share this question
or