ASP.NET Validation Controls with SampleCode
1.RequiredFieldValidator - is using for checking empty data or checking an initial value.
ErrorMessage="Enter Password" ControlToValidate="txtPassword"
SetFocusOnError="True">?
2.RegularExpressionValidator - is using for checking the data based upon a regular expression.
ErrorMessage="Invalid mail address" ControlToValidate="txtMail"
SetFocusOnError="True"
ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*">?
3.RangeValidator - is using for checking whether the input is in a range as we specified.
ErrorMessage="Invalid data" ControlToValidate="txtPassword"
MaximumValue="100" MinimumValue="0" SetFocusOnError="True" Type="Double">?
4.CompareValidator - is using for comparing two controls.
ErrorMessage="Retype password" ControlToCompare="txtPassword"
ControlToValidate="txtRePassword">?
SetFocusOnError="True">?
2.RegularExpressionValidator - is using for checking the data based upon a regular expression.
SetFocusOnError="True"
ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*">?
3.RangeValidator - is using for checking whether the input is in a range as we specified.
MaximumValue="100" MinimumValue="0" SetFocusOnError="True" Type="Double">?
4.CompareValidator - is using for comparing two controls.
ControlToValidate="txtRePassword">?
Labels: Validation Controls

0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home