Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

RangeValidator Can't Count?

I am trying to validate length of a string in a TextBox. Controls on page defined as follows:

<asp:TextBox runat="server" ID="TB" />
<asp:RangeValidator runat="server" ID="RV" 
MinimumValue="3" MaximumValue="20" 
ControlToValidate="TB" Type="String" />

But when page runs there is run time error occurred

The MaximumValue 20 cannot be less than the MinimumValue 3

like image 207
Pankaj Agarwal Avatar asked Nov 30 '22 08:11

Pankaj Agarwal


1 Answers

You mention Type incorrect, it should be Type="Integer" instead Type="String"

like image 97
Muhammad Akhtar Avatar answered Dec 14 '22 07:12

Muhammad Akhtar