It can compare two values, for instance the
values of two controls.
Compare Validator Syntax:
Small number:<br />
<asp:TextBox runat="server" id="txtSmallNumber"
/><br /><br />
Big number:<br />
<asp:TextBox runat="server" id="txtBigNumber"
/><br />
<asp:CompareValidator runat="server"
id="cmpNumbers" controltovalidate="txtSmallNumber" controltocompare="txtBigNumber" operator="LessThan" type="Integer"
errormessage="The first number should be smaller than the second
number!" /><br />
No comments:
Post a Comment