Click here to Skip to main content
15,905,508 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi ,
i use comparevalidator like this:

<asp:CompareValidator runat="server" id="cmpNumbers" controltovalidate="txtTIN"
ValueToCompare="000000000" operator="GreaterThan" type="Integer" errormessage="Invalid Tin Number" />

but it shows error msg in both condition weather i enter 00000000000 or 12345678912 why so.
and i am checking foe 11 digit no. and you suggest value to compare only 9 digit 000000000.
pls explain, and help.
Posted

1 solution

Number with leading zero (0xxxxxxxx) is not integer value!

You need to compare string! Here is an idea: RegularExpressionValidator Control (General Reference)[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900