This one compares data in one field to another field or to a
constant (or a Data Type). It has several options which I will cover now.
- Instead of ControltoCompare you can use ValuetoCompare if
you want to use a constant value.
- Operators can be one of the following:
- The Type property can be one of the following:
Here is the example:
id="FName2" runat="server" />Last Name: <asp:TextBox id="LName2" runat="server"
ControltoValidate="FName2" ControltoCompare="LName2" Type="String"
Operator="NotEqual" ErrorMessage="Your First Name can't be your last name
as well!" />
This makes sure that your first name isn't your last name
(don't complain if your first name is also your last name, this is just an