Having trouble with default text in Password textbox

2 posts, 0 answers
  1. Tad Rhodes
    Tad Rhodes avatar
    10 posts
    Member since:
    Jun 2009

    Posted 01 Dec 2009 Link to this post

    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
  2. Dimo
    Admin
    Dimo avatar
    8486 posts

    Posted 02 Dec 2009 Link to this post

    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.
Back to Top