Validating user


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.

Microsoft is conducting an online survey to understand your opinion of the Technet Web site.

validating user-43validating user-77validating user-16

However, the test will be performed in server code.

You can control how validation errors are displayed by defining CSS classes that have the following reserved names: .

Performing validation in server code is a security measure, in case users bypass client-based validation.

In this example, the test for a valid date won't work in client code.

If a form is long or complex, reporting errors only after the page is submitted can be inconvenient to the user.