IDReferencePropertyAttribute クラス
アセンブリ: System.Web (system.web.dll 内)

<AttributeUsageAttribute(AttributeTargets.Property)> _ Public NotInheritable Class IDReferencePropertyAttribute Inherits Attribute
[AttributeUsageAttribute(AttributeTargets.Property)] public sealed class IDReferencePropertyAttribute : Attribute
[AttributeUsageAttribute(AttributeTargets::Property)] public ref class IDReferencePropertyAttribute sealed : public Attribute

IDReferencePropertyAttribute クラスは、ID 参照を含んでいるプロパティに適用されます。ID 参照を含んでいるプロパティの例としては、ContentPlaceHolderID があります。この属性が適用されていると、デザイナはデザイン時に、ID の一覧表示などの追加機能を使用できます。

文字列と評価されるプロパティに IDReferencePropertyAttribute 属性を適用する方法を次のコード例に示します。この例では、DataSourceID メンバでデータ ソース コントロールを識別します。したがって DataSourceControl 型を指定しています。
' 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 'SomeDataBoundControl


System.Attribute
System.Web.UI.IDReferencePropertyAttribute


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
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


- IDReferencePropertyAttribute クラスのページへのリンク