One of the most common elements of Web pages is a form in which the user can input data that is posted back to the server.
These forms are made up of different types of HTML elements that are constructed using straight HTML, HTML server controls, or Web server controls.
To make your application accessible when using this component, you must provide an additional, accessible feedback mechanism.
I want to check what the user is writing in a textbox before I save it in a database. I guess I can always write some ifs or some try-catch blocks, but I was wondering if there's a better method.
I've read something about Validating Events, but I am not sure how can I use them. Validating Event When you change the focus by using the keyboard (TAB, SHIFT+TAB, and so on), by calling the Select or Select Next Control methods, or by setting the Container Control.
Active Control property to the current form, focus events occur in the following order Enter Got Focus Leave Validating Validated Lost Focus When you change the focus by using the mouse or by calling the Focus method, focus events occur in the following order: Enter Got Focus Lost Focus Leave Validating Validated event provides the hook to perform the validation and Error Provider gives a nice consistent approach to providing the user with feedback on any error conditions.
though: The Error Provider component does not provide built-in support for accessibility clients.
NET Summary: Learn how to use all the available ASP.