CompareValidator | .NET 1.1, disposable |
System.Web.UI.MobileControls (system.web.mobile.dll) | class |
This CompareValidator compares the input control
(ControlToValidate) to a specified value
(ValueToCompare) or a value in another control
(ControlToCompare). Both values will be converted
to the data type specified by Type before they are
compared. Note that if you set both ValueToCompare
and ControlToCompare, the latter will take
precedence.
The Operator property specifies the expression
that must be met in order for validation to succeed. In other words,
ControlToValidate <Operator>
ControlToCompare must be true. The compare validator works
the same as the
System.Web.UI.WebControls.CompareValidator used
with full-fledged Web Forms.
public class CompareValidator : BaseValidator {
// Public Constructors
public CompareValidator( );
// Public Instance Properties
public string ControlToCompare{set; get; }
public ValidationCompareOperator Operator{set; get; }
public ValidationDataType Type{set; get; }
public string ValueToCompare{set; get; }
// Protected Instance Methods
protected override bool ControlPropertiesValid( ); // overrides BaseValidator
protected override BaseValidator CreateWebValidator( ); // overrides BaseValidator
protected override bool EvaluateIsValid( ); // overrides BaseValidator
}
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)
CompareValidator
|