
738
|
Chapter 40: The System.Web.UI.MobileControls Namespace
This is the Title of the Book, eMatter Edition
Copyright © 2008 O’Reilly & Associates, Inc. All rights reserved.
The ErrorMessage property specifies the message that will be displayed in the validation
control if validation fails, although this text can be overridden by changing the valida-
tion control’s Text property. The ErrorMessage will also appear in a page’s ValidationSummary
control, if present on the page. By default, ASP.NET will not render any output for a
control if it is not visible. This means that space will not be allocated for a validation
control unless validation fails. The Display property allows you to allocate space for a
validation control by specifying System.Web.UI.WebControls.ValidatorDisplay.Static, which may be
required if your validation control is in a table. You can also set this property to System.
Web.UI.WebControls.ValidatorDisplay.None to specify that no validation message will be
displayed in the control, although one will still be shown in the ValidationSummary control,
if used.
Hierarchy
System.Object ➝ System.Web.UI.Control(System.ComponentModel.IComponent, System.
IDisposable, System.Web.UI.IParserAccessor, System.Web.UI.IDataBindingsAccessor)
➝
MobileControl(System.Web.UI.IAttributeAccessor) ➝ TextControl ➝ BaseValidator(System.
Web.UI.IValidator)
Subclasses
CompareValidator, CustomValidator, RangeValidator, ...