Click here to Skip to main content
16,017,852 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi, I have a textbox. In textbox if i enter more than 3 digits after the decimal it should throw a msg...After the decimal it should accept only Zero(0) as 1st digit...And i wanna compare last two digits out of 3 digits after the decimal with a value.. If the entered last two digits exceeds the value then it should throw a msg..How can i do it...Can u help me...
Posted
Comments
Nishant Singh 6-Dec-10 2:19am    
Do you want to do this on client side ??
Nishant Singh 6-Dec-10 2:28am    
Sorry I though it was related to ASP.net .......my mistake :-)
Toli Cuturicu 6-Dec-10 3:34am    
I wouldn't use such a software!

1 solution

XML
<asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server"
    ControlToValidate="TextBox1" ErrorMessage="RegularExpressionValidator"
    ValidationExpression="(^\d*\.\d{3}$)"></asp:RegularExpressionValidator>
 
Share this answer
 

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