Click here to Skip to main content
15,891,253 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hey friends,
In my project i want to use following validation controls.
The controls are:
1.Date range comparison using range validator.
2.Decimal validation and Number validation which can able to accept plus(+),minus(-),hyphen(-),and in that decimal validation value must restrict up to three decimals as (12.123).
If you have any suggestions help me.
Posted

1 solution

For Range Validator refer ASP.NET RangeValidator Control[^] and follow this code
C#
<asp:textbox id="txtPassword" runat="server" textmode="Password">
<asp:regularexpressionvalidator id="REV1" runat="server" errormessage="Password can only be between 6 to 15 characters.!">
ControlToValidate="txtPassword" ValidationExpression="[\s\S]{6,15}">

For Custom Validator check Validation - CustomValidator[^] and CustomValidator Class[^]
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900