This documentation is archived and is not being maintained.

BaseValidator.CheckControlValidationProperty Method

Helper function that verifies whether the specified control is on the page and contains validation properties.

[Visual Basic]
Protected Sub CheckControlValidationProperty( _
   ByVal name As String, _
   ByVal propertyName As String _
)
[C#]
protected void CheckControlValidationProperty(
 string name,
 string propertyName
);
[C++]
protected: void CheckControlValidationProperty(
 String* name,
 String* propertyName
);
[JScript]
protected function CheckControlValidationProperty(
   name : String,
 propertyName : String
);

Parameters

name
The control to verify.
propertyName
Provides additional text to describe the source of the exception, if an exception is thrown from using this method.

Exceptions

Exception Type Condition
HttpException The specified control is not found.

-or-

The specified control does not have a ValidationProperty attribute associated with it; therefore, it cannot be validated with a validation control.

Remarks

The CheckControlValidationProperty method is a helper function primarily used by the ControlPropertiesValid method to verify whether the specified control is on the page and contains validation properties. This method does not return a value to report the result. Instead, it throws an exception when verification fails.

Note   This method is primarily used by control developers.

Requirements

Platforms: Windows 2000, Windows XP Professional, Windows Server 2003 family

See Also

BaseValidator Class | BaseValidator Members | System.Web.UI.WebControls Namespace | ControlPropertiesValid | PropertiesValid

Show: