Langue

HtmlHelper.Label Méthode

Définition

Surcharges

Nom Description
Label(String)

Retourne un nom HTML qui affiche le texte spécifié.

Label(String, Object)

Retourne un nom HTML qui affiche le texte spécifié et inclut les attributs personnalisés spécifiés.

Label(String, String)

Renvoie une étiquette HTML qui affiche le texte spécifié et qui a l’attribut spécifié pour.

Label(String, String, IDictionary<String,Object>)

Renvoie une étiquette HTML qui affiche le texte spécifié et qui a le spécifié pour les attributs et les attributs personnalisés définis par un dictionnaire d’attributs.

Label(String, String, Object)

Renvoie une étiquette HTML qui affiche le texte spécifié et qui a le spécifié pour l’attribut et les attributs personnalisés définis par un objet d’attribut.

Label(String)

Retourne un nom HTML qui affiche le texte spécifié.

public System.Web.IHtmlString Label (string labelText);
member this.Label : string -> System.Web.IHtmlString
Public Function Label (labelText As String) As IHtmlString

Paramètres

labelText
String

Texte à afficher.

Retours

Balisage HTML qui représente le nom.

Exceptions

Sytem.ArgumentException

labelText a la valeur Null ou est vide.

S’applique à

Label(String, Object)

Retourne un nom HTML qui affiche le texte spécifié et inclut les attributs personnalisés spécifiés.

public System.Web.IHtmlString Label (string labelText, object attributes);
member this.Label : string * obj -> System.Web.IHtmlString
Public Function Label (labelText As String, attributes As Object) As IHtmlString

Paramètres

labelText
String

Texte à afficher.

attributes
Object

Objet qui contient les attributs personnalisés de l'élément. Les noms et les valeurs des attributs sont récupérés par réflexion en examinant les propriétés de l'objet.

Retours

Balisage HTML qui représente le nom.

Exceptions

Sytem.ArgumentException

labelText a la valeur Null ou est vide.

S’applique à

Label(String, String)

Renvoie une étiquette HTML qui affiche le texte spécifié et qui a l’attribut spécifié pour.

public System.Web.IHtmlString Label (string labelText, string labelFor);
member this.Label : string * string -> System.Web.IHtmlString
Public Function Label (labelText As String, labelFor As String) As IHtmlString

Paramètres

labelText
String

Texte à afficher.

labelFor
String

Valeur à affecter à l’attribut for de l’élément de contrôle HTML.

Retours

Balisage HTML qui représente le nom.

Exceptions

Sytem.ArgumentException

labelText a la valeur Null ou est vide.

S’applique à

Label(String, String, IDictionary<String,Object>)

Renvoie une étiquette HTML qui affiche le texte spécifié et qui a le spécifié pour les attributs et les attributs personnalisés définis par un dictionnaire d’attributs.

public System.Web.IHtmlString Label (string labelText, string labelFor, System.Collections.Generic.IDictionary<string,object> attributes);
member this.Label : string * string * System.Collections.Generic.IDictionary<string, obj> -> System.Web.IHtmlString
Public Function Label (labelText As String, labelFor As String, attributes As IDictionary(Of String, Object)) As IHtmlString

Paramètres

labelText
String

Texte à afficher.

labelFor
String

Valeur à affecter à l’attribut for de l’élément de contrôle HTML.

attributes
IDictionary<String,Object>

Noms et valeurs des attributs personnalisés de l'élément.

Retours

Balisage HTML qui représente le nom.

Exceptions

Sytem.ArgumentException

labelText a la valeur Null ou est vide.

S’applique à

Label(String, String, Object)

Renvoie une étiquette HTML qui affiche le texte spécifié et qui a le spécifié pour l’attribut et les attributs personnalisés définis par un objet d’attribut.

public System.Web.IHtmlString Label (string labelText, string labelFor, object attributes);
member this.Label : string * string * obj -> System.Web.IHtmlString
Public Function Label (labelText As String, labelFor As String, attributes As Object) As IHtmlString

Paramètres

labelText
String

Texte à afficher.

labelFor
String

Valeur à affecter à l’attribut for de l’élément de contrôle HTML.

attributes
Object

Objet qui contient les attributs personnalisés de l'élément. Les noms et les valeurs des attributs sont récupérés par réflexion en examinant les propriétés de l'objet.

Retours

Balisage HTML qui représente le nom.

Exceptions

Sytem.ArgumentException

labelText a la valeur Null ou est vide.

S’applique à