You have great control over how validation errors are reported. For example, rather than putting error messages alongside the control, you can summarize all the validation failures with a
control. This control can place a summary of the errors in a bulleted list, a simple list, or a paragraph that appears on the web page or in a pop-up message box.
ValidationSummary control at the bottom of the page (after the table). There are a few properties to set in the design view. Set the
valSum (that becomes the ID of the validation summary control). Next set the
DisplayMode by clicking on the Display Mode property. Notice that the various valid display modes are displayed in a drop-down list, as shown in Figure 9-8.
Interestingly, if you choose to set these attributes by hand, in Source Mode, IntelliSense helps you with the valid Display Modes as well, as shown in Figure 9-9. You can leave the default,
BulletList, for now.
In addition to choosing among a
SingleParagraph format for displaying the list of errors, you must decide on whether to show a summary at the bottom of the page and/or a pop-up message box. You configure this using the
ShowSummary properties, as shown in Figure 9-10.
False for now.
HeaderText property holds the header that will be displayed if there are errors to report. Set it to
The following errors were found:.