.NET Framework Class Library
ContainerControl..::.Validate Method

Verifies the value of the control losing focus by causing the Validating and Validated events to occur, in that order.

Namespace:  System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)
Syntax

Visual Basic (Declaration)
Public Function Validate As Boolean
Visual Basic (Usage)
Dim instance As ContainerControl
Dim returnValue As Boolean

returnValue = instance.Validate()
C#
public bool Validate()
Visual C++
public:
bool Validate()
JScript
public function Validate() : boolean

Return Value

Type: System..::.Boolean
true if validation is successful; otherwise, false. If called from the Validating or Validated event handlers, this method will always return false.
Remarks

The Validate method validates the last child control that is not validated and its ancestors up through, but not including, the current container control. This overloaded version always performs validation, regardless of the value of the AutoValidate property of the control's parent. Therefore use it to unconditionally force validation.

Platforms

Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Version Information

.NET Framework

Supported in: 3.5, 3.0, 2.0, 1.1, 1.0
See Also

Reference

Tags :


Page view tracker