Export (0) Print
Expand All

ValidatedControlConverter Class

Converts a control on the Web Forms page that can be validated with a validation control to a string containing the control's ID.

Namespace: System.Web.UI.WebControls
Assembly: System.Web (in system.web.dll)

public class ValidatedControlConverter : ControlIDConverter
public class ValidatedControlConverter extends ControlIDConverter
public class ValidatedControlConverter extends ControlIDConverter
Not applicable.

Not all controls can be validated with a validation control. This class creates a collection of control IDs on the Web Forms page that can be associated with a validation control. This collection is commonly used in a designer to display a list of controls on the Web Forms page that can be associated with a validation control.

When creating your own validation control, you can enable the designer to display a list of controls that support validation controls. Simply add an attribute to the string property that represents the control to validate, as follows:

[TypeConverter(typeof(ValidatedControlConverter))]
 public string ControlToValidate
 {
    get 
    {
       // Add code to get the ID of the control to validate.
    }
    set
    {
       // Add code to set the ID of the control to validate.
    }
 }

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Windows 98, Windows Server 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0, 1.1, 1.0

Community Additions

ADD
Show:
© 2015 Microsoft