Self-validating web forms
Sorry to post side-notes, but I think these are relevent to anyone using this code:- Copy, I agree, this should not affect the data validation, but if you try to copy (or paste) using the keyboard shortcuts () the validation code stops your keypresses and stops you copying data from the input boxes.No problem I agree with you and I am open to suggestions That was a very basic example and quite easyto modify you just need to add the keycodes that you need to allow it Eg
As a previous answer mentioned, there is the AJAX Toolkit Controls you can download - check out these pages Control Toolkit/Samples/ Releases.aspx?
More information about Custom Data Annotations can be grabbed from here.
The Remote feature provides Asynchronous Validation on the Model property.
using Custom Data Annotations, Remote validation etc.
In Custom Data Annotations we need to create a separate class derived from the Validation Attribute base class.
It also stops other basic keyboard functions like use of the left and right cursor keys to move around within the input box!