Validate Decimal numbers

Posted by Venkat | Labels: ,

Now we are going to discuss about the validate the decimal numbers it should be in the format of


<asp:TextBox ID="Phone_TextBox" runat="server"></asp:TextBox>
<asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ErrorMessage="RegularExpressionValidator"
ValidationExpression="^\d+\.\d{2}$" ValidationGroup="phone" ControlToValidate="Phone_TextBox">it should be 125.00 this format</asp:RegularExpressionValidator>
<asp:Button ID="Button1" runat="server" Text="Button" ValidationGroup="phone" /></div>


Matches

142.00
254.25 etc

Non-Matches

214
25.0
254.5
254.355

code:

PayOffers.in