October 2010
Intermediate to advanced
1920 pages
73h 55m
English
ValidatedFieldIn this final section, we create a ValidatedField custom field, which automatically validates the data that a user enters into GridView when editing a record. ValidatedField uses RequiredFieldValidator to check whether a user has entered a value, and CompareValidator to check whether the value is the correct data type (see Figure 11.25).
Figure 11.25. Using ValidatedField to edit a record.

ValidatedField is a composite field. The field contains three child controls—a TextBox, RequiredFieldValidator, and CompareValidator—wrapped up in a container control.
The code for the ValidatedField is too long to include in this ...
Read now
Unlock full access