NameExtensions.IdFor(Of TModel, TProperty) Method (HtmlHelper(Of TModel), Expression(Of Func(Of TModel, TProperty)))

 

Gets the ID of the HtmlHelper(Of TModel) string

Namespace:   System.Web.Mvc.Html
Assembly:  System.Web.Mvc (in System.Web.Mvc.dll)

<ExtensionAttribute>
Public Shared Function IdFor(Of TModel, TProperty) (
	html As HtmlHelper(Of TModel),
	expression As Expression(Of Func(Of TModel, TProperty))
) As MvcHtmlString

Parameters

html
Type: System.Web.Mvc.HtmlHelper(Of TModel)

The HTML helper instance that this method extends.

expression
Type: System.Linq.Expressions.Expression(Of Func(Of TModelTProperty))

An expression that identifies the object that contains the ID.

Return Value

Type: System.Web.Mvc.MvcHtmlString

The HTML ID attribute value for the object that is represented by the expression.

Type Parameters

TModel

The type of the model.

TProperty

The type of the property.

Return to top
Show: