RadTextBox error with content character "<"

3 posts, 0 answers
  1. Aurelio Righetti
    Aurelio Righetti avatar
    51 posts
    Member since:
    May 2009

    Posted 27 Sep 2010 Link to this post

    Hi,
    i have a big problem with radtextbox when the field content the character < and send a Insert procedure.
    Example:
    When the user enters the notes produced by other software in the database (sqlserver 2008 type field varchar(2000), it needs' to include this description:

    Note product:
    This product in very good,
    the steeel is: OC2<HO3

    and the software save it ok. (the software is a desktop application).

    The select reads the data correctly and displays in a  RadTextBox correctly in a aspnet application. But when I do insert the orders, I get the error:

    Errore di run-time di Microsoft JScript: Sys.WebForms.PageRequestManagerServerErrorException: Errore sconosciuto durante l'elaborazione della richiesta sul server. Codice di stato restituito dal server: 500
     
    File: Telerik.Web.UI.WebResource_6.axd

    it happens before the event:
    protected void FormView1_ItemInserted(object sender, FormViewInsertedEventArgs e)

    The problem is when the "<" character is inserted between two letters without a space.
    The problem not persist when the character is insert with space, example: OC2 < HO3

    It 's a problem of the radtextbox ?  or you can not enter the character < without spaces between two letters?

    Tnks
    Aurelio
  2. Cori
    Cori avatar
    562 posts
    Member since:
    Jul 2010

    Posted 27 Sep 2010 Link to this post

    Hello Aurelio,

    The problem is more specific to ASP.NET, which does not allow a page to postback when it find "<" or ">" in any of its input controls (i.e. TextBox) because of Cross Site Scripting attacks. If you want to allow the page to postback when those characters are found then set this ValidateRequest="false" in your <%@ Page %> declaration at the top of you page.

    I hope that helps.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Aurelio Righetti
    Aurelio Righetti avatar
    51 posts
    Member since:
    May 2009

    Posted 27 Sep 2010 Link to this post

    Hello Cori,
    Thnks for the solution in workfine...
    By Aurelio
Back to Top