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

Paste invalid data into RadNumericTextBox

3 Answers 78 Views
Input
This is a migrated thread and some comments may be shown as answers.
Phil
Top achievements
Rank 2
Phil asked on 06 Feb 2012, 07:33 PM
Hi:

I was testing a RadNumericTextBox.  It is somewhat declared as follows:
<telerik:RadNumericTextBox ID="quantityTextBox" Runat="server" MaxLength="4"
    MaxValue="9999" MinValue="1" Text='<%# Bind("Quantity") %>' Width="60px"
    OnTextChanged="quantityTextBox_TextChanged" AutoPostBack="True"
    />
I was testing for XSS (cross site scripting) and was able to paste <scr into the textbox.  I was not able to type the value, but surprisingly, I was able to paste non-numeric data.

Phil

3 Answers, 1 is accepted

Sort by
0
Kevin
Top achievements
Rank 2
answered on 07 Feb 2012, 08:26 PM
Hello Phil,

It's true that you can paste the value in, but after the control loses focus, it gets removed. At least that is how it works on the demo site.
0
Phil
Top achievements
Rank 2
answered on 08 Feb 2012, 12:28 AM
Hi:

I have an OnChange event on the text-box and it is processed.  It is not the expected behavior.  Not good.

Phil
0
Elliott
Top achievements
Rank 2
answered on 08 Feb 2012, 10:55 PM
is there an OnError client event?  you can set_value('') at that point
Tags
Input
Asked by
Phil
Top achievements
Rank 2
Answers by
Kevin
Top achievements
Rank 2
Phil
Top achievements
Rank 2
Elliott
Top achievements
Rank 2
Share this question
or