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

ASP.NET validators on Telerik textboxes

1 Answer 96 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Andy
Top achievements
Rank 1
Andy asked on 25 Aug 2011, 09:46 PM
I've added an ASP.NET required validator on a Telerik textbox.  I've noticed that the validator reports the contents of the textbox to be empty when the screen is first rendered, even though the textbox was prepopulated with text from a database.  Refreshing the screen seems to make the validator recognize the text again.

I know telerik textboxes render as three input controls.  Could the validator be trying to read the wrong input control?

<!-- FULL NAME -->
<div class="FixedBlockCtrl" style="top:10px;left:60px;">   
    <asp:Label ID="lblFullNameB" cssclass="standardLabel" runat="server" 
        Text="Name *" ></asp:Label>
</div
<div class="FixedBlockCtrl" style="top:10px;left:100px;">    
<telerik:RadTextBox ID="txtFullNameB" Label="" 
        cssclass="standardTextbox"   runat="server" 
        Width="200px" >
</telerik:RadTextBox>
<asp:RequiredFieldValidator ID="reqFullNameB" runat="server" EnableClientScript="False" ControlToValidate="txtFullNameB"
ToolTip="First and last names required" Display="Dynamic" Text="*" 
ErrorMessage="Enter the first and last names of the coordinator" Enabled="true" ></asp:RequiredFieldValidator>    
</div>
<!-- EOF FIRST NAME -->

1 Answer, 1 is accepted

Sort by
0
Iana Tsolova
Telerik team
answered on 31 Aug 2011, 07:37 AM
Hello Andy,

I added the provided code to a runnable sample, however the validator is not fired when the RadTextBox has Text initially. Can you check it out and let me know how it works on your end and if I missed something out?

Greetings,
Iana
the Telerik team

Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

Tags
General Discussions
Asked by
Andy
Top achievements
Rank 1
Answers by
Iana Tsolova
Telerik team
Share this question
or