Validating number in asp net
NET validation controls provide basic web form validations.
In some cases you need more control on the validation process.
If the user enters an invalid number and submits the form they are greeted with the server side response as shown below.
The first step to support client side validation is to implement a Model Validator that can be associated with the Credit Card Attribute.
NET control through Attributes collection and not via Custom Validator control.
[/update] This article came up on the news today: Allowing Only Numbers in ASP.
All that’s left is to enable client validation by making a call to Html.