Aracılığıyla paylaş


UserControl.Attributes Özellik

Tanım

.aspx dosyasındaki kullanıcı denetimi etiketinde bildirilen tüm öznitelik adı ve değer çiftlerinden oluşan bir koleksiyon alır.

public:
 property System::Web::UI::AttributeCollection ^ Attributes { System::Web::UI::AttributeCollection ^ get(); };
[System.ComponentModel.Browsable(false)]
public System.Web.UI.AttributeCollection Attributes { get; }
[<System.ComponentModel.Browsable(false)>]
member this.Attributes : System.Web.UI.AttributeCollection
Public ReadOnly Property Attributes As AttributeCollection

Özellik Değeri

AttributeCollection Kullanıcı denetimi etiketinde bildirilen tüm ad ve değer çiftlerini içeren bir nesne.

Öznitelikler

Örnekler

Aşağıdaki kod örneği, kullanıcı denetimini içeren sayfada kullanıcı denetiminin AttributesMessage örneğini oluşturan özel denetim etiketinde bildirilen özniteliğe erişmek için kullanıcı denetiminin özelliğini kullanır.

// Retrieve and display the 'Message' attribute tag 
// initialized in the .aspx code.
Response.Write("<b>Message tag value declared in the aspx file is : </b>" + myControl.Attributes["Message"]);
' Retrieve and display the 'Message' attribute tag 
' initialized in the .aspx code.
Response.Write("<b>Message tag value declared in the aspx file is : </b>" + myControl.Attributes("Message"))                    

Şunlara uygulanır

Ayrıca bkz.