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

RadTextBox error with content character "<"

2 Answers 39 Views
Input
This is a migrated thread and some comments may be shown as answers.
Aurelio Righetti
Top achievements
Rank 1
Aurelio Righetti asked on 27 Sep 2010, 06:01 PM
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)
 

Dizionario - Visualizza dizionario dettagliato

  1. congiunzione
    1. but
    2. yet
    3. however
    4. still

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
 

Dizionario - Visualizza dizionario dettagliato

  1. sostantivo
    1. la
  2. abbreviazione
    1. A
  3. pronome
    1. it
    2. her
    3. you
  4. articolo
    1. the
    2. a
    3. an

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

Tnks
Aurelio

2 Answers, 1 is accepted

Sort by
0
Cori
Top achievements
Rank 2
answered on 27 Sep 2010, 09:49 PM
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.
0
Aurelio Righetti
Top achievements
Rank 1
answered on 27 Sep 2010, 11:25 PM
Hello Cori,
Thnks for the solution in workfine...
By Aurelio
Tags
Input
Asked by
Aurelio Righetti
Top achievements
Rank 1
Answers by
Cori
Top achievements
Rank 2
Aurelio Righetti
Top achievements
Rank 1
Share this question
or