I am new to ASP.net.. Can anybody explaine me how to do number validation..? I need for phone number, age etc... very urgent.. Pls..

Do you know how to use a validator control or do you want to do the validation in code-behind?

<asp:RegularExpressionValidator 
   id="RegularExpressionValidator4" 
   runat="server" 
   ControlToValidate="txtPhoneNumber"
   ErrorMessage="Please enter a default 10 digit contact number (eg:111-111-1111)" 
   ValidationExpression="((\(\d{3}\) ?)|(\d{3}-))?\d{3}-\d{4}">*</asp:RegularExpressionValidator>
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.