Bagikan melalui


NameExtensions.IdFor<TModel,TProperty> Metode

Definisi

Mendapatkan ID HtmlHelper<TModel> string

public static System.Web.Mvc.MvcHtmlString IdFor<TModel,TProperty>(this System.Web.Mvc.HtmlHelper<TModel> html, System.Linq.Expressions.Expression<Func<TModel,TProperty>> expression);
static member IdFor : System.Web.Mvc.HtmlHelper<'Model> * System.Linq.Expressions.Expression<Func<'Model, 'Property>> -> System.Web.Mvc.MvcHtmlString
<Extension()>
Public Function IdFor(Of TModel, TProperty) (html As HtmlHelper(Of TModel), expression As Expression(Of Func(Of TModel, TProperty))) As MvcHtmlString

Jenis parameter

TModel

Jenis model.

TProperty

Jenis properti.

Parameter

html
HtmlHelper<TModel>

Instans pembantu HTML yang diperluas metode ini.

expression
Expression<Func<TModel,TProperty>>

Ekspresi yang mengidentifikasi objek yang berisi ID.

Mengembalikan

Nilai atribut ID HTML untuk objek yang diwakili oleh ekspresi.

Berlaku untuk