Check a number ranges with minimum and maximum number, alphabetic and Date.
Properties
Maximum Value: Highest value that you want to check.
Minimum Value: Lowest value that you want to check.
Type: Which Data Type that you want to check.
Example
1. Create a ASP.NET website then add Standard TextBox and RangeValidator.
2. Select your RangeValidatorand set require properties for validate (see Table 1).
Properties | Value |
---|---|
ControlToValidate | TextBox1 |
ErrorMassage | You are not 18-50 years old !! |
MamimumValue | 50 |
MinimumValue | 18 |
Type | Integer |
Table 1: Require Properties for RangeValidator
3. Test your application you will see error message when you input value that not in range (Figure 1).
Figure 1: Range Check Example
##############################
CustomValidator << Previous Chapter || Next Chapter >> RequiredFieldValidator
##############################
CustomValidator << Previous Chapter || Next Chapter >> RequiredFieldValidator
No comments:
Post a Comment