Localization support for RadTextBox/password strength?

3 posts, 0 answers
  1. Kevin
    Kevin avatar
    9 posts
    Member since:
    Nov 2014

    Posted 17 Jun 2016 Link to this post

    I have a RadTextBox field used as a password entry field.  Furthermore, I'm using the built-in password strength indicator for this field as follows:

        PasswordStrengthSettings  ShowIndicator="true"

    I need for the strength text to be culturally sensitive but I'm not seeing a Localization attribute to work with.  How can this text be set?


    Thanks in advance.

  2. Kevin
    Kevin avatar
    9 posts
    Member since:
    Nov 2014

    Posted 17 Jun 2016 Link to this post

    Actually, I found how these are set by this page:  https://demos.telerik.com/aspnet-ajax/textbox/functionality/password-strength-checker/defaultcs.aspx

    While the property takes a delimited list, it was a bit more difficult since I use resource files.  It would have been nice to set these in a declarative way such as this:

    <PasswordStrengthSettings  TextStrengthDescriptions="<%$ Resources: Mystrings, lblOne %>;<%$ Resources: Mystrings, lblTwo %>;<%$ Resources: Mystrings, lblThree %>;<%$ Resources: Mystrings, lblFour %>;<%$ Resources: Mystrings, lblFive %>"  ...

    or even with a bound, server-side string variable (concatenation) but this is invalid.


    What I ended up doing was tapping the textbox's OnLoad event:

        <telerik:RadTextBox runat="server" ID="rtbPassword" OnLoad="rtbPassword_Load" ...

    and setting this property in the server-side OnLoad event code like this:

        rtbPassword.PasswordStrengthSettings.TextStrengthDescriptions = string.Format("{0};{1};{2};{3};{4}" ...


    Not the best solution in my opinion, but it does work.


  3. Maria Ilieva
    Maria Ilieva avatar
    4017 posts

    Posted 22 Jun 2016 Link to this post

    Hello Kevin,

    I'm glad to hear that you were ale to find solution on your end and thank you for sharing it in the forum. It will be of a big help for other users that are implementing the same scenarios.

    Maria Ilieva
    Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
Back to Top