IDReferencePropertyAttribute 생성자

정의

IDReferencePropertyAttribute 클래스의 새 인스턴스를 초기화합니다.

오버로드

IDReferencePropertyAttribute()

IDReferencePropertyAttribute 클래스의 새 인스턴스를 초기화합니다.

IDReferencePropertyAttribute(Type)

지정한 형식을 사용하여 IDReferencePropertyAttribute 클래스의 새 인스턴스를 초기화합니다.

IDReferencePropertyAttribute()

IDReferencePropertyAttribute 클래스의 새 인스턴스를 초기화합니다.

public:
 IDReferencePropertyAttribute();
public IDReferencePropertyAttribute ();
Public Sub New ()

예제

다음 코드 예제에서는 방법을 IDReferencePropertyAttribute 특성 문자열로 계산 되는 속성에 적용 됩니다. 이 예제는 DataSourceID 런타임에 데이터 소스 컨트롤을 식별 하는 멤버입니다. 매개 변수가 없는 생성자를 ReferencedControlType 사용하면 속성이 기본값 Control으로 설정됩니다.

// This class implements a custom data source control.
public class SomeDataBoundControl : DataBoundControl
{
    [ IDReferencePropertyAttribute() ]        
    new public string DataSourceID {
        get {
            return base.DataSourceID;
        }
        set {
            base.DataSourceID = value;
        }
    }
}
' This class implements a custom data source control.
Public Class SomeDataBoundControl
    Inherits DataBoundControl
    
    <IDReferencePropertyAttribute()>  _
    Public Shadows Property DataSourceID() As String 
        Get
            Return MyBase.DataSourceID
        End Get
        Set
            MyBase.DataSourceID = value
        End Set
    End Property
    
End Class

설명

이 생성자를 호출 하는 경우는 ReferencedControlType 속성이 Control, 기본값으로 합니다.

추가 정보

적용 대상

IDReferencePropertyAttribute(Type)

지정한 형식을 사용하여 IDReferencePropertyAttribute 클래스의 새 인스턴스를 초기화합니다.

public:
 IDReferencePropertyAttribute(Type ^ referencedControlType);
public IDReferencePropertyAttribute (Type referencedControlType);
new System.Web.UI.IDReferencePropertyAttribute : Type -> System.Web.UI.IDReferencePropertyAttribute
Public Sub New (referencedControlType As Type)

매개 변수

referencedControlType
Type

Type가 적용된 속성이 나타내는 컨트롤 형식을 지정하는 IDReferencePropertyAttribute입니다.

예제

다음 코드 예제에서는 방법을 IDReferencePropertyAttribute 특성 문자열로 계산 되는 속성에 적용 됩니다. 이 예제에서는 DataSourceID 멤버는 데이터 소스 컨트롤을 식별 하 고 따라서 지정 된 DataSourceControl 형식입니다.

// 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;
        }
    }
}
' This class implements a custom data source control.
Public Class SomeDataBoundControl
    Inherits DataBoundControl
    
    <IDReferencePropertyAttribute(GetType(DataSourceControl))>  _
    Public Shadows Property DataSourceID() As String 
        Get
            Return MyBase.DataSourceID
        End Get
        Set
            MyBase.DataSourceID = value
        End Set
    End Property
    
End Class

추가 정보

적용 대상