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

RadTextBox casues validation errors

1 Answer 57 Views
Input
This is a migrated thread and some comments may be shown as answers.
psanchez117
Top achievements
Rank 1
psanchez117 asked on 09 Aug 2011, 01:43 AM
I have been searching all over for an answer to this but to no avail... I am hoping someone here can help me.
I have a form that is intended to send field information to a support email address. I have disabled validation on all of the controls on this form to troubleshoot this.
When i fill the form out and click submit, it works fine, i get my Email as expected...

However, if i have special characters in any of the radtextbox fields, i get a validation error. Just the simple phrase <ValidateThis> will break the page.

Now i have created a routine to clean the text and replace the characters which ascii equivalents but the problem is that the validation error occurs before anything is run. How do i intercept this?

Thanks
Phil

1 Answer, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 11 Aug 2011, 10:16 PM
Hello Phil,

One option to avoid this behavior is to attach the OnKeyPress event of RadTextBox and cancel the event if invalid character is pressed. 

Please go through the link below:
OnKeyPress

All the best,
Pavlina
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
psanchez117
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
Share this question
or