asp.net.ph

BaseCompareValidator Class

System.Web.UI.WebControls Namespace


Serves as the abstract base class for validation controls that perform typed comparisons.

BaseCompareValidator Class Members

Collapse   Properties

Visibility Name Value Type Accessibility
public CultureInvariantValues Boolean [ Get , Set ]
public Type ValidationDataType [ Get , Set ]

Collapse   Methods

Visibility Name Parameters Return Type
protected AddAttributesToRender ( HtmlTextWriter writer ) Void
public static CanConvert ( String text , ValidationDataType type , Boolean cultureInvariant ) Boolean
public static CanConvert ( String text , ValidationDataType type ) Boolean
protected static Compare ( String leftText , String rightText , ValidationCompareOperator op , ValidationDataType type ) Boolean
protected static Compare ( String leftText , Boolean cultureInvariantLeftText , String rightText , Boolean cultureInvariantRightText , ValidationCompareOperator op , ValidationDataType type ) Boolean
protected static Convert ( String text , ValidationDataType type , Boolean cultureInvariant , Object& value ) Boolean
protected static Convert ( String text , ValidationDataType type , Object& value ) Boolean
protected DetermineRenderUplevel ( ) Boolean
protected static GetDateElementOrder ( ) String
protected static GetFullYear ( Int32 shortYear ) Int32

Remarks

The BaseCompareValidator class is inherited by validation controls that compare values, such as the CompareValidator and RangeValidator controls.

Use the Type property to specify the data type that the values are converted to before being compared.

NOTE: If the value of the input control associated with the validation control cannot be converted to the specified data type, validation fails. The IsValid property of the validation control is set to false.

The BaseCompareValidator class also contains several static properties and methods that are useful when performing comparison validations. You can determine whether a string can be converted to a specific data type by using the CanConvert method. The maximum year that can be represented by a two digit year is contained in the CutoffYear property. The GetFullYear method allows you to convert a two digit year to a four digit year.

For additional information on validation controls, see BaseValidator.

See Also

BaseValidator   CompareValidator   RangeValidator   Type   Validating Against a Data Type Skip Navigation Links




Home
Suggested Reading


Previous page Back to top Next page

© 2000-2010 Rey Nuñez All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note

You can help support asp.net.ph