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 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 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

.NET Framework

Supported in: 2.0, 1.1, 1.0

Community Additions

ADD
Show:
© 2014 Microsoft