Number Validation in Textbox of ASP.NET Using Regular Expression Validator

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" 
ControlToValidate="AssetsTextBox" Display="Dynamic" >

1 comment: