RadTextbox special character issue

3 posts, 0 answers
  1. shunman
    shunman avatar
    77 posts
    Member since:
    Jul 2011

    Posted 05 Dec 2012 Link to this post

    Hello.

    We have a problem.

    If I input special character  "<br/>" or "<a>" into RadTextbox and submit data,

    server exception error raised  "System.Web.HttpRequestValidationException"

    please let me know how can I solve this problem.
  2. Kevin
    Kevin avatar
    360 posts
    Member since:
    Jul 2012

    Posted 07 Dec 2012 Link to this post

    Hello Shunman,

    The only way to prevent this error from appearing is to turn off Request Validation or remove the tags from your textboxes when submitting the form. If you want to keep these values, you can change you RadTextBox controls into RadEditor controls, if that is the kind of input you want to accept.

    I hope that helps.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Maria Ilieva
    Admin
    Maria Ilieva avatar
    4017 posts

    Posted 10 Dec 2012 Link to this post

    Hello Shunman,

    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



    Kind regards,
    Maria Ilieva
    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.
Back to Top