You do not have to use the validation control to output a response when the validator or page IsValid property is false. On both the client and server side you can create a custom response, such as a color change in a control or a font change for text on a label.

To display custom validation messages

In the Page_Load event handler, call the Validate method of the validation control or of the page.

Check the IsValid property of the validation control or page and conditionally add text or a control, or change the properties (for example, color) of a control.

The following code example displays the text "All entries are valid" when the IsValid property is true, and the text "There are one or more invalid entries" when the property is false.