Validation Control Program
Validation Control Program
STEP 1
Create design using web controls
Step 2
Change error message and controltovalidate for corresponding required field
Step 3
Change forecolour to all required field as red like below image
Step 4
Password and retype password textbox change textmode as password
Step 5
Email id next to required field just drag and drop regular expression validator control
Step 4
MOBILE NUMBER VALIDATION – DRAG AND DROP REGULAR EXPRESSION VALIDATION
AND CHANGE LIKE BELOW IMAGE
Step 5
Password using compare validation – drag and drop compare validation to retype
password textbox
Step 6
Range validation – for age field just drag and drop range validation and change shown in
image
Step 7
User id drag and drop custom validator and change properties shown in image
After change type coding inside the custom validation double click and type this coding
protected void CustomValidator1_ServerValidate(object source,
ServerValidateEventArgs args)
{
string str;
str = args.Value;
if (str.Length > 3)
{
args.IsValid = true;
}
else
{
args.IsValid = false;
}
}
Step 8
Drag and drop validation summary in below submit button and change image