Below is a simple example of Number Validation in Textbox of ASP.Net Using Regular Expression Validator.
It will also allow all decimal number, excluding all alphanumeric characters.
<asp:TextBox ID="AssetsTextBox" runat="server" Width="240px"></asp:TextBox>
<asp:RegularExpressionValidator ID="revAssets" runat="server"
ErrorMessage="Assets must be a number" Font-Bold="False"
Font-Size="Small"
ValidationExpression="^\d*[0-9](|.\d*[0-9]|,\d*[0-9])?$"
ControlToValidate="AssetsTextBox" Display="Dynamic" >
</asp:RegularExpressionValidator>
The .NET Framework allows developers to use the same set of skills to rapidly buid great applications for the web, windows, services and more.
Showing posts with label Validate Number. Show all posts
Showing posts with label Validate Number. Show all posts
Number Validation in Textbox of ASP.NET Using Regular Expression Validator
Subscribe to:
Posts (Atom)