Compare a specify data type or Compare a user's entry value between two controls.
Properties (Data Type Checked)
Operator : Choose "DataTypeCheck"
Type : Which Data Type that you want to check.
Example Data Type Checked
1. Create a ASP.NET website then add Standard TextBox and CompareValidator.
2. Select your CompareValidator and set require properties for validate (see Table 1).
Properties | Value |
---|---|
ControlToValidate | TextBox1 |
ErrorMassage | Wrong !! |
Operator | DataTypeCheck |
Type | Integer |
Table 1: Require Properties for Compare
3. Test your application you will see error message when you input wrong data type (Figure 1).
Figure 1: Data Type Check Example
3. Test your application you will see error message when you input wrong data type (Figure 1).
Figure 1: Data Type Check Example
##############################
CompareValidator (Check Equal) << Previous Chapter || Next Chapter >> CustomValidator
CompareValidator (Check Equal) << Previous Chapter || Next Chapter >> CustomValidator
No comments:
Post a Comment