BaseCompareValidator

BaseCompareValidatordisposable

System.Web.UI.WebControls (system.web.dll)abstract class

This abstract class provides basic functionality for the CompareValidator and RangeValidator classes, which perform validation through comparisons. The shared (static) GetFullYear( ) method converts a two-digit year (like "98") to a four-digit representation ("1998"), while CutoffYear sets the maximum four-digit year value that it will allow to be represented in two digits. The shared CanConvert( ) method determines whether a string can be converted to a given ValidationDataType, while the Type property sets the ValidationDataType that the current instance of the control is validating text against.

public abstract class BaseCompareValidator : BaseValidator { // Protected Constructors     protected BaseCompareValidator( );  // Protected Static Properties    protected static int CutoffYear{get; } // Public Instance Properties    public ValidationDataType Type{set; get; } // Public Static Methods    public static bool CanConvert(string text, ValidationDataType type); // Protected Static Methods    protected static bool Compare(string leftText, string rightText,          ValidationCompareOperator op,  ValidationDataType type);    protected static bool Convert(string text, ValidationDataType type, out object value);    protected static string GetDateElementOrder( );    protected static int GetFullYear(int shortYear); // Protected Instance Methods    protected override void AddAttributesToRender(System.Web.UI.HtmlTextWriter writer);  // overrides BaseValidator    protected override bool DetermineRenderUplevel( );             // overrides BaseValidator }

Hierarchy

System.Object System.Web.UI.Control(System.ComponentModel.IComponent, System.IDisposable, System.Web.UI.IParserAccessor, System.Web.UI.IDataBindingsAccessor) WebControl(System.Web.UI.IAttributeAccessor) Label BaseValidator(System.Web.UI.IValidator) BaseCompareValidator

Subclasses

CompareValidator, RangeValidator



ASP. NET in a Nutshell
ASP.NET in a Nutshell, Second Edition
ISBN: 0596005202
EAN: 2147483647
Year: 2003
Pages: 873

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net