System.Web.UI.ControlValuePropertyAttribute Class

Specifies the default property of a control that a System.Web.UI.WebControls.ControlParameter object binds to at run time. This class cannot be inherited.

See Also: ControlValuePropertyAttribute Members

Syntax

[System.AttributeUsage(System.AttributeTargets.Class, AllowMultiple=false, Inherited=true)]
public sealed class ControlValuePropertyAttribute : Attribute

Remarks

When defining a System.Web.UI.WebControls.ControlParameter object, you typically bind a control's property to a parameter by setting both the System.Web.UI.WebControls.ControlParameter.ControlID and System.Web.UI.WebControls.ControlParameter.PropertyName properties. If the System.Web.UI.WebControls.ControlParameter.PropertyName property is not set, a default property is used. The System.Web.UI.ControlValuePropertyAttribute attribute is applied to a control to specify its default property that a System.Web.UI.WebControls.ControlParameter object binds to at run time.

For more information about using attributes, see Extending Metadata Using Attributes.

For a list of initial property values for an instance of the System.Web.UI.ControlValuePropertyAttribute class, see the erload:System.Web.UI.ControlValuePropertyAttribute.#ctor constructor.

Requirements

Namespace: System.Web.UI
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 2.0.0.0
Since: .NET 2.0