RadTextBox show nothing in TextMode="Password"

3 posts, 0 answers
  1. Jose
    Jose avatar
    10 posts
    Member since:
    Oct 2013

    Posted 09 Oct 2013 Link to this post

    I generate a password using the method  Membership.GeneratePassword(6, 2) from .net framework and setting the RadTextBox
    txtPassword.Attributes.Add("value", passwordfgenerated). I want to show in the RadTextBox the asterisks
     That works with asp:TextBox but not with RadTextBox


    <div class="field-box">
                <div class="left-field left-label">
                    <asp:Label CssClass="right-field" ID="lblPassword" runat="server" Text="Password:"></asp:Label>
                    <a href="#?w=800" rel="PasswordHelp" class="left-field poplight" tabindex="0"></a>
                </div>
                <telerik:RadTextBox CssClass="left-field" ID="txtPassword" runat="server" TextMode="Password" MaxLength="20">
                </telerik:RadTextBox>
     </div>
    protected void bnGeneratePassword_Click(object sender, EventArgs e)
     {
    string passwordGenerated = Membership.GeneratePassword(6, 2);
    txtPassword.Attributes.Add("value", passwordGenerated);
    }


  2. Eyup
    Admin
    Eyup avatar
    3726 posts

    Posted 14 Oct 2013 Link to this post

    Hi Jose,

    I will forward your query to our developers for further insight on the matter and let you know about the result as soon as I get a reply.

    Regards,
    Eyup
    Telerik
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
  3. Eyup
    Admin
    Eyup avatar
    3726 posts

    Posted 16 Oct 2013 Link to this post

    Hi Jose,

    Thank you for your patience.

    Please note that passing any Password type text from server to client is strictly restricted and we highly suggest you to avoid such vulnerable approach. You can try to generate the random password using javascript methods on the client-side and the use set_value('SamplePassword') to the RadTextBox client object.

    I hope the clarification was helpful.

    Regards,
    Eyup
    Telerik
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Back to Top