ASP.NET : RangeValidator

RangeValidator 
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).


PropertiesValue
ControlToValidateTextBox1
ErrorMassageYou are not 18-50 years old !!
MamimumValue50
MinimumValue18
TypeInteger

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).

Shorty Bluejova, Open Learning, Programming

Figure 1: Range Check  Example

##############################

CustomValidator << Previous Chapter || Next Chapter >> RequiredFieldValidator

No comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...