System.Web.UI.WebControls Namespace
Specifies the display behavior of error messages in validation controls.
Member Name |
Description |
Static |
The validator contents are displayed inline if validation fails, but takes up space on the page even when hidden. |
Dynamic |
The validator contents are displayed inline if validation fails, but takes up space on the page only when visible. |
None |
The validation contents are never displayed inline. |
The ValidatorDisplay enumeration represents the different display behaviors of error messages in validation controls.
Static specifies that space for the error messages are allocated when the page renders. The layout of the page does not change when the validator displays its error message; hence, error messages of multiple validators for the same input control will have to occupy different physical locations on the page.
Dynamic specifies that space for the error messages are allocated only when when validation fails. The layout of the page dynamically changes when the validator displays its error message; hence, error messages of multiple validators for the same input control can share the same physical location on the page.
None specifies that the error message will not display at all on the page. Use this option when you want to display the error message only in a ValidationSummary control.
Controlling Validation Message Display ErrorMessage