I am created one customvalidator for checking the min salary and max salary. What I did means I get minsalary value in one textbox and maxsalary in one textbax. if the maxsalary is less than minsalary means it'll display some error message.
Some of the Testcase min-40 max-65 -Noerror min-40 max-400-Error
Actually what It doing means it compare the min salary first digit with maxsalary first digit and second digit likewise it checking.if it's less than means it'll automatically displayed the error message. Can any one please help me how to solve this problem
Wouldn't it be easier to use a CompareValidator instead of a customvalidator ? Like so:
<asp:CompareValidator ID="CompareValidator1" runat="server" ControlToValidate="txtMaxSal" Operator="LessThan" ControlToCompare="txtMinSal" Type="Integer" Text="*" ErrorMessage="Error Text here"></asp:CompareValidator>