How to Validate Registration From using Validation Controls In Asp.net??
hi friends...
today I am going to show you,How to validate Registration form in Asp.net?
here, to validate an asp.net form ,we can validation controls provided by asp.net
microsoft asp.net provides built-in validation controls..they are..
1.Required field validation control
2.Range Validation control
3.Regular Expression validation Control
4.Compare validator
5.Custom validator
6.validation summary group..
already I designed on registration form in visual studio using asp.net controls
so watch guys how to use asp.net validation controls to validate registration form.
here name,age,gender,gmail are required fields so I wanted to use required filed validator..
for gender no need to validate..because already option is chosen..
next I want to compare password and confirm password so I will use compare validator..
here extra property: compare to control
next I want to validate age between 20 to 30 so I can use range validator..
and data of join also should be between 01Jan2017 to 31Dec2017
next I want to validate city it is also mandatory field..
but for city values displaying in dropdown so guys please watch validation of dropdown,it is some little bit tricky...
our form validation is done successfully but our gmail field has taken any format but its not correct
because gmail should be in this format [email protected]
so here we can use regular expression validator to validate gmail field...
the validation message for gmail field is displaced after some gap...
set display property:dynamic for required field validator(first validation control)
validation is done successfully message is coming from server side (cs page)
Please subscribe n share
/ prasadamudalapalli