These pairs let you define rules for both conditions: an error condition and a "normal" (non-error) condition.
It's important to understand that the markup for the error display is always rendered, even if there are no errors.
In that case, the validation is performed as users work in the browser.
For example, suppose you specify that a value should be an integer.
This article discusses how to validate information you get from users — that is, to make sure that users enter valid information in HTML forms in an ASP. What you'll learn: If you ask users to enter information in a page — for example, into a form — it's important to make sure that the values that they enter are valid.
In this example, the test for a valid date won't work in client code.
When users enter values into an HTML form, the values that they enter are strings.
In many cases, the values you need are some other data types, like integers or dates.
Sometimes you have to validate information that doesn't come directly from an HTML form.
A typical example is a page where a value is passed in a query string, as in the following example: source, including form-field values, query-string values, and cookie values.