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

Telerik Project Template and Client Side Asp Validation

2 Answers 40 Views
Installer and VS Extensions
This is a migrated thread and some comments may be shown as answers.
Kai-Uwe
Top achievements
Rank 1
Kai-Uwe asked on 02 Oct 2018, 11:17 AM

I am using VS 2017 and Telerik UI for ASP.NET AJAX R3 2018. When I create a new Telerik Project using the Telerik C# Web Forms Site Template (Blank) and I add the following snippet to the placeholder div tag in the Default.aspx page ...

<telerik:RadTextBox
            ID="RadTextBox1"
            runat="server"
            Skin="WebBlue">
        </telerik:RadTextBox>
        <asp:RequiredFieldValidator
            ID="TextBoxRequiredFieldValidator"
            runat="server"
            Display="Dynamic"
            ControlToValidate="RadTextBox1"
            ErrorMessage="The textbox can not be empty!">
        </asp:RequiredFieldValidator>

 

... then the client side validation is not working.

When I enter a text and remove it, then the error message is not shown.

 

When I add jQuery by <script src="Scripts/jquery.min.js"></script> then client side validation is working.

That is not the correct solution as jQuery is already loaded by the telerik web ui assembly.

Adding a ScriptReference or a script ressource mapping is not solving the issue.

So, how I have to set up a telerik project to get the asp validators working as expected?

2 Answers, 1 is accepted

Sort by
0
Accepted
Rumen
Telerik team
answered on 02 Oct 2018, 11:46 AM
Hi Kai-Uwe,

I tried but unfortunately unable to recreate the reported problem with a newly created Telerik WebSite project. For your convenience I recorded a video and attached my test project. Can you please try to modify the project so that it starts to demo the issue and send it back.

Can you disable the unobtrusive validation in the web.config and test again: 

<configuration>
    <appSettings>
         <add key="ValidationSettings:UnobtrusiveValidationMode" value="None"/>

In case, you'd like to use Unobtrusive validation check the documentation at jQuery Troubleshooting.

Regards,
Rumen
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Kai-Uwe
Top achievements
Rank 1
answered on 02 Oct 2018, 04:21 PM
Thanks for your very fast help. You solved my issue.
Tags
Installer and VS Extensions
Asked by
Kai-Uwe
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Kai-Uwe
Top achievements
Rank 1
Share this question
or