A is a string made up of characters from a masking language that specifies which characters can be entered at any given position in the text box. If the user types an incorrect entry, for example, the user types a letter when a digit is required, the control will automatically reject the input.
Important If you have custom validation that takes place after the Validating event, it will not affect the data binding.
You can also make use of Filtered Text Box Extender. On key Press event, just call a function and pass event as parameter. Can you tell me how I can compare the value of 2 textboxes in c#? Textbox1 = 3, Textbox2 = 4 I want to throw an error message to say something to the effect that the value entered in Textbox2 has to be smaller than textbox1.
By using validation, you can make sure that your control's data satisfies the format required by the data source, and that it does not contain any special characters such as quotation marks and back slashes that might be unsafe.
When you use data binding, the data in your control is synchronized with the data source during execution of the Validating event.