IDReferencePropertyAttribute.IDReferencePropertyAttribute(Type) Constructor

Initializes a new instance of the IDReferencePropertyAttribute class using the specified type.

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

public IDReferencePropertyAttribute (
	Type referencedControlType
)
public IDReferencePropertyAttribute (
	Type referencedControlType
)
public function IDReferencePropertyAttribute (
	referencedControlType : Type
)
Not applicable.

Parameters

referencedControlType

A Type that specifies the type of the control represented by the property to which the IDReferencePropertyAttribute is applied.

The following code example demonstrates how the IDReferencePropertyAttribute attribute is applied to a property that evaluates to a string. In this example, the DataSourceID member identifies a data source control and therefore specifies the DataSourceControl type.

// This class implements a custom data source control.
public class SomeDataBoundControl : DataBoundControl
{   
    [ IDReferencePropertyAttribute(typeof(DataSourceControl)) ]        
    new public string DataSourceID {
        get {
            return base.DataSourceID;
        }
        set {
            base.DataSourceID = value;
        }
    }
    
}

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
Show: