Only digits, the digit may be decimal (regular expression)
https://stackoverflow.com/questions/2145503
Solution
You can use RegularExpressionValidator
and here is Validation Expression ValidationExpression="[0-9]*\.?[0-9]*"
Finally it will be look like...
<asp:RegularExpressionValidator ID="rgx" ControlToValidate="txtControl" runat="server"
ErrorMessage="*" Display="Dynamic" ValidationExpression="[0-9]*\.?[0-9]*"></asp:RegularExpressionValidator>
OTHER TIPS
Have you considered using a RangeValidation as an alternative? This may not meet your requirements but it does give you the ability to specify the input type you are expecting which could be any one of string, integer, double, date or currency. Choosing double or currency and setting the MinimumValue and MaximumValue properties to values which meet your input requirements may do the trick.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow