Version

Control Property (ValidationErrorEventArgs)

Returns the control whose value failed validation, or null if the validation entity is not a control, or more than one control was validated. Applicable only when IsSingleEntityValidation returns true.
Syntax
'Declaration
 
Public ReadOnly Property Control As Control
public Control Control {get;}
Remarks

Note: In the case where the validation was triggered by one of the Validate method overloads which could potentially involve more than one control, the Control property returns null. In this case, a reference to each control that failed validation can be obtained by iterating the Errors collection returned by the Validation property, and accessing the Control property of the ValidationSettings instance returned by that ValidationResult.

The Control and Editor properties are mutually exclusive in that when one returns a valid reference, the other must return null.

Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also