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

RadTextBox Issue as a password.

1 Answer 111 Views
Input
This is a migrated thread and some comments may be shown as answers.
atul
Top achievements
Rank 1
atul asked on 11 Jun 2011, 04:46 PM
I am using RadTextbox in my program as a password:

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

<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 "
                                                        CssClass="custom-label"></asp:Label>

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

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"));

txtPassword.Text="abc#123";
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.

1 Answer, 1 is accepted

Sort by
0
Iana Tsolova
Telerik team
answered on 15 Jun 2011, 08:47 AM
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";


Regards,
Iana
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.

Tags
Input
Asked by
atul
Top achievements
Rank 1
Answers by
Iana Tsolova
Telerik team
Share this question
or