You must Sign In to post a response.
  • Category: ASP.NET

    How to Validate like this 10.05 & 100.05

    Hello Developers,

    how i validate
    How to Validate Text box value like this 10.05 & 100.05
    Numbers and Dot only allowed.
    1.Textbox1=10.05 or xx.yy //first two digit int last two digit decimal
    2.Textbox1=100.05 or xxx.yy//first three digit int last two digit decimal
    in 1 and 2 2 secimal values is must.if there is no decimal value or no decimal value without extension of 2 it should be =(validate message) validate please enter valid decimal with extension of 2 decimal value.


    i have tried
    If anyone know this please tell me some idea.

    thanks with
  • #763372
    Please try this. It should work.


    <asp:TextBox ID="TextBox2" runat="server" />
    <br />
    <asp:RegularExpressionValidator ID="Regex2" runat="server" ValidationExpression="((\d+)+(\.\d+))$"
    ErrorMessage="Invalid data" ControlToValidate="TextBox2" />


  • Sign In to post your comments