skip to content »

Validating integer datatype with regularexpressionvalidator

The Static setting renders the validation control inline with other controls.This means that blank space is occupied by the control when it is not showing a message.

validating integer datatype with regularexpressionvalidator-78

If bad data is discovered in these circumstances, correcting it is an overwhelming, if not impossible, task.Data can come from many different sources such as other internal systems, other external systems, and other components of the same system.In this situation, it is not sufficient to rely solely on the presentation layer for validation. NET 2.0 offers a wide variety of ways to capture user input.This translates to, many opportunities for users to provide bad data.Validation Controls Required Field Validator Control: The Required Field Validator control is used to ensure that fields that must be populated with data are, indeed, populated with data.

This control can be used with virtually any data entry controls, such as Text Box, Drop Down List, and Check Box.

Validation Controls Common Properties It should be no surprise that ASP. You can use these flexible controls out of the box or build on them through inheritance to create your own validation controls. NET validation controls have some common properties with which you should be familiar.

The following listing describes the common properties among validation controls.

Use the Dynamic setting when you want to avoid the control occupying blank space.

Enable Client Script: Not every browser supports Java Script, and even browsers supporting it might have it disabled.

However, for those browsers that support Java Script, the validation controls can perform client-side validation as well as server-side validation.