How to validate integer and float input in asp.net textbox

Posted by Rajesh Rolen- DotNet Developer on Stack Overflow See other posts from Stack Overflow or by Rajesh Rolen- DotNet Developer
Published on 2010-03-04T09:54:04Z Indexed on 2010/05/31 12:03 UTC
Read the original article Hit count: 643

Filed under:
|

I am using below code to validate interger and float in asp.net but if i not enter decimal than it give me error

 <asp:TextBox ID="txtAjaxFloat" runat="server" />
 <cc1:FilteredTextBoxExtender ID="FilteredTextBoxExtender1" TargetControlID="txtAjaxFloat" FilterType="Custom, numbers" ValidChars="." runat="server" />

i have this regex also but its giving validation error if i enters only one value after decimal.. http://stackoverflow.com/questions/617826/whats-a-c-regular-expression-thatll-validate-currency-float-or-integer

© Stack Overflow or respective owner

Related posts about ASP.NET

Related posts about validations