Aesthetic Properties for the Validation Web Controls

As we have seen numerous times in this hour, when a user enters invalid input, the appropriate validation control's ErrorMessage is displayed. In all of the examples, this error message has been displayed in a red font. However, the look and feel of the error message can be specified by setting the various aesthetic properties of the validation Web controls.

As with all Web controls, the validation Web controls contain the typical aesthetic properties—BackColor, BorderColor, BorderStyle, Font, and so on. In addition to these standard aesthetic properties, the validation controls also contain a Display property, which specifies how the ErrorMessage property is displayed when the user provides ...

Get SAMS Teach Yourself ASP.NET in 24 Hours now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.