Aracılığıyla paylaş


HtmlHelper.AnonymousObjectToHtmlAttributes(Object) Yöntem

Tanım

Giriş nesnesinden HTML öznitelikleri sözlüğü oluşturur ve alt çizgileri her genel örnek özelliğindeki tirelere çevirir.

public:
 static System::Collections::Generic::IDictionary<System::String ^, System::Object ^> ^ AnonymousObjectToHtmlAttributes(System::Object ^ htmlAttributes);
public static System.Collections.Generic.IDictionary<string,object> AnonymousObjectToHtmlAttributes (object htmlAttributes);
static member AnonymousObjectToHtmlAttributes : obj -> System.Collections.Generic.IDictionary<string, obj>
Public Shared Function AnonymousObjectToHtmlAttributes (htmlAttributes As Object) As IDictionary(Of String, Object)

Parametreler

htmlAttributes
Object

HTML özniteliklerini açıklayan anonim nesne.

Döndürülenler

HTML özniteliklerini temsil eden sözlük.

Açıklamalar

Nesne zaten bir IDictionary<TKey,TValue> örnekse, sığ bir kopya döndürülür.

new { data_name="value" } , sonuçta elde edilen sözlükteki girdiye { "data-name", "value" } çevrilir.

Şunlara uygulanır