BaseCompareValidator.Compare Method (String, String, ValidationCompareOperator, ValidationDataType)
Assembly: System.Web (in system.web.dll)
protected: static bool Compare ( String^ leftText, String^ rightText, ValidationCompareOperator op, ValidationDataType type )
protected static boolean Compare ( String leftText, String rightText, ValidationCompareOperator op, ValidationDataType type )
protected static function Compare ( leftText : String, rightText : String, op : ValidationCompareOperator, type : ValidationDataType ) : boolean
Not applicable.
Parameters
- leftText
The value on the left side of the operator.
- rightText
The value on the right side of the operator.
- op
One of the ValidationCompareOperator values.
- type
One of the ValidationDataType values.
Return Value
true if the leftValue parameter relates to the rightValue parameter in the manner specified by the op parameter; otherwise, false.The Compare(String,String,ValidationCompareOperator,ValidationDataType) method is used to test whether the value of the leftText parameter relates to the value of the rightText parameter in the manner specified by the op parameter. The type parameter specifies the data type of the values being compared.
Note: |
|---|
| If the op parameter is set to ValidationCompareOperator.DataTypeCheck, this method tests only the value of the leftText parameter for the data type specified by the type parameter. The rightText parameter is ignored. |
This version of the method compares the values using the format used by the current culture. To compare the values using a culture-neutral format, use the BaseCompareValidator.Compare(String,Boolean,String,Boolean,ValidationCompareOperator,ValidationDataType) overloaded version of this method.
Note: