IHtmlHelper.Label(String, String, Object) Metodo

Definizione

Restituisce un <elemento etichetta> per l'oggetto specificato expression.

C#
public Microsoft.AspNetCore.Html.IHtmlContent Label (string expression, string labelText, object htmlAttributes);

Parametri

expression
String

Nome dell'espressione, relativo al modello corrente.

labelText
String

Testo interno dell'elemento.

htmlAttributes
Object

Oggetto Object contenente gli attributi HTML per l'elemento. In alternativa, un'istanza IDictionary<TKey,TValue> contenente gli attributi HTML.

Restituisce

Nuovo IHtmlContent contenente l'elemento <label> .

Si applica a

Prodotto Versioni
ASP.NET Core 1.0, 1.1, 2.0, 2.1, 2.2, 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0