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

RadTextBox, TextMode=Password and EmptyText

7 Answers 1723 Views
Input
This is a migrated thread and some comments may be shown as answers.
Alexander Shashkin
Top achievements
Rank 1
Alexander Shashkin asked on 27 Jun 2012, 04:48 PM
Hi all,

I found that EmptyText doesn't work properly for RadTextBox if it has TextMode=Password.
I use v.2012.2.607.35
Also, I noticed that it doesn't work even on demo page:
http://demos.telerik.com/aspnet-ajax/input/examples/radtextbox/firstlook/defaultcs.aspx 

7 Answers, 1 is accepted

Sort by
0
Vasil
Telerik team
answered on 28 Jun 2012, 08:49 AM
Hi Alexander,

Check this out:
Changes in RadInput in Q2 2012 version of RadControls

And this 2 workarounds:
Set EmptyMessage for TextBox in Password Mode
How to Use an EmptyMessage with Password RadTextBoxes


Greetings,
Vasil
the Telerik team
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 their blog feed now.
0
Alexander Shashkin
Top achievements
Rank 1
answered on 28 Jun 2012, 09:14 AM
Hi Vasil,

Thank you for your answer!

But these 2 workarounds don't work for me because I don't understand why I need to use RadTextBox and implement this logic myself? In this case it is better to use asp text box or something else, because I at least will not need to download styles/scripts. 

About first link: I understand what you try to do, but I don't understand why you released new version and didn't checked that old features will work. I still think that this issue is a bug and it should be fixed.
If you don't plan to fix it then I think that it will be better if code of example will be edited and so on.
Notice that this issue not only about EmptyMessage/placeholder, but also there is some bug in JS: just click on input and then click on form. You will see that input will have some text.
0
Vasil
Telerik team
answered on 28 Jun 2012, 10:22 AM
Hello,

In short because the new version is way faster and lighter than the old one, and empty message in password моде is used too rarely to make the whole control heavier because of this, and even there are 2 possible workarounds. Of course you could use asp:TextBox, and you will have to do similar client logic.  Yes it is considered as limitation since it was never working before Q1 2012, and there is PITS issue about it. We just think that the whole control (numeric text box, masked text box and date input) should not suffer of performance penalty to work in this insulated case that is applied for the TextBox only.

About the demo: the idea of the demos is to show the exact plain functionality, so the people to know how the controls behaves and what to expect. All custom solutions are posted in the CodeLibrary section. Focus/blur causes the empty message to be shown, and it is a bug that it is not shown from the beginning and we have fixed this, but the demos are using the official version and not hotfixes so they will stay such way until the Service Pack.

Greetings,
Vasil
the Telerik team
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 their blog feed now.
0
Eder
Top achievements
Rank 1
answered on 28 Jun 2013, 07:14 AM
Hi, I have found a solution for this problem.

In the ASPX file:

<ajaxToolkit:TextBoxWatermarkExtender ID="WatermarkPassword" runat="server" TargetControlID="TB_Password" WatermarkText="No password" WatermarkCssClass="textInput" />
<asp:TextBox ID="TB_Password" runat="server" TextMode="Password" CssClass="textInput" MaxLength="20"></asp:TextBox>

In the CS file when in some case don't want to show this watermark:

WatermarkPassword.Enabled = false;
0
ghini
Top achievements
Rank 2
answered on 20 Jul 2014, 09:26 AM
the bug is still present in version 2014.1.403.45....
0
Princy
Top achievements
Rank 2
answered on 21 Jul 2014, 05:53 AM
Hi ghini,

It is not possible to set any Text (including EmptyMessage) in a password input mode, this is a browser restriction. The input type should be set to text to be able to display some text in the input (which is achieved inRadTextBox by setting the TextMode as "SingleLine" or "MultiLine" and not to "Password"). The "password" type causes the browser to display any text one sets in the well known password mode. Please try to to use the any of the work around that mentioned in the above posts. 

Thanks,
Princy.

0
Joe
Top achievements
Rank 2
answered on 27 Mar 2015, 06:22 PM
Important note... this only works if the text is stars: **************
Tags
Input
Asked by
Alexander Shashkin
Top achievements
Rank 1
Answers by
Vasil
Telerik team
Alexander Shashkin
Top achievements
Rank 1
Eder
Top achievements
Rank 1
ghini
Top achievements
Rank 2
Princy
Top achievements
Rank 2
Joe
Top achievements
Rank 2
Share this question
or