NameExtensions.NameFor<TModel,TProperty> Méthode
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
Obtient le nom de champ HTML complet de l'objet représenté par l'expression.
public static System.Web.Mvc.MvcHtmlString NameFor<TModel,TProperty>(this System.Web.Mvc.HtmlHelper<TModel> html, System.Linq.Expressions.Expression<Func<TModel,TProperty>> expression);
static member NameFor : System.Web.Mvc.HtmlHelper<'Model> * System.Linq.Expressions.Expression<Func<'Model, 'Property>> -> System.Web.Mvc.MvcHtmlString
<Extension()>
Public Function NameFor(Of TModel, TProperty) (html As HtmlHelper(Of TModel), expression As Expression(Of Func(Of TModel, TProperty))) As MvcHtmlString
Paramètres de type
- TModel
Type du modèle.
- TProperty
Type de la propriété.
Paramètres
- html
- HtmlHelper<TModel>
Instance du programme d'assistance HTML qui est étendue par cette méthode.
- expression
- Expression<Func<TModel,TProperty>>
Expression identifiant l'objet qui contient le nom.
Retours
Nom de champ HTML complet de l'objet représenté par l'expression.