mmalik15
asked on
validate Textbox input for decimal values in c#
Hi,
I want to validate user input for deicmal values upto two decimal places. I dont want to use Ajax Mased Input. Any idea
thanks
I want to validate user input for deicmal values upto two decimal places. I dont want to use Ajax Mased Input. Any idea
thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
If you don't require users to type the decimals but only want to prevent them from inputting more than 2, you can use a CompareValidator, set the ControlToValidate to your textbox, set the Operator to DataTypeCheck and Type to Currency.
It will allow numbers like 123 | 123.0 | 123.00 | 123.99
It will allow numbers like 123 | 123.0 | 123.00 | 123.99
Open in new window