RadTextBox Issue as a password.

2 posts, 0 answers
  1. atul
    atul avatar
    1 posts
    Member since:
    Feb 2011

    Posted 11 Jun 2011 Link to this post

    I am using RadTextbox in my program as a password:

    <telerik:RadAjaxPanel ID="radAjaxPanelUserManagement" runat="server">
            <telerik:RadPanelBar runat="server" ID="radPanelBarUser" Width="100%">
                    <telerik:RadPanelItem Enabled="True" Text="Add/Edit User" runat="server" Expanded="false"
                        Visible="false" Value="userMasterPanel">
                            <telerik:RadPanelItem Enabled="True" runat="server" Value="userPanel" Expanded="false">

    <asp:Label ID="lblTextboxPassword" runat="server" Text="Password " CssClass="custom-label"></asp:Label>
    <telerik:RadTextBox ID="txtPassword" runat="server" CssClass="custom-txtbox" Rows="1" Width="175px" MaxLength="15" ShowButton="False" SelectionOnFocus="None" TextMode="Password" CausesValidation="true" TabIndex="4" >
    </telerik:RadTextBox><asp:Label ID="lblTextboxConfirmPassword" runat="server" Text="Confirm Password "

    <telerik:RadTextBox ID="txtConfirmPassword" runat="server" TextMode="Password" Rows="1"
                                                            MaxLength="15" Width="175px" CssClass="custom-txtbox" CausesValidation="true"
                                                            TabIndex="5" >
                <CollapseAnimation Duration="100" Type="None" />
                <ExpandAnimation Duration="100" Type="None" />

    Issue creates when i want to fill value of this text box on .cs file. That value is not showing on the web page.

    public void editUser(Object sender, EventArgs arg)
         RadTextBox txtPassword = ((RadTextBox)radPanelBarUser.FindItemByValue(PureAnalyzer_WebApp.UserPanel).FindControl("txtPassword"));
                RadTextBox txtConfirmPassword = RadTextBox)radPanelBarUser.FindItemByValue(PureAnalyzer_WebApp.UserPanel).FindControl("txtConfirmPassword"));

    txtConfirmPassword .Text="abc#123";


    In this code i want to fill value of fill some dynamic value to radtextbox but this shows as a blank. 
    Please help me in this issue.
  2. Iana Tsolova
    Iana Tsolova avatar
    3388 posts

    Posted 15 Jun 2011 Link to this post

    Hi atul,

    The described behavior is rather expected. You can replicate it with ASP:TextBox and html <input> controls. And this is done on purpose for security reasons.
    However you can overcome this limitation if you try to set the text as below:
    txtPassword.Attributes["value"] ="abc#123";
    txtConfirmPassword.Attrbutes["value"] ="abc#123";

    the Telerik team

    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

Back to Top