Returns an HTML input element for each property in the object that is represented by the expression, using the specified template, HTML field name, and additional view data.
public static System.Web.Mvc.MvcHtmlString EditorFor (this System.Web.Mvc.HtmlHelper html, System.Linq.Expressions.Expression> expression, string templateName, string htmlFieldName, object additionalViewData);
static member EditorFor : System.Web.Mvc.HtmlHelper * System.Linq.Expressions.Expression> * string * string * obj -> System.Web.Mvc.MvcHtmlString
Public Function EditorFor(Of TModel, TValue) (html As HtmlHelper(Of TModel), expression As Expression(Of Func(Of TModel, TValue)), templateName As String, htmlFieldName As String, additionalViewData As Object) As MvcHtmlString
Type Parameters
TModel
The type of the model.
TValue
The type of the value.
Parameters
The HTML helper instance that this method extends.
expression
Expression>
An expression that identifies the object that contains the properties to display.
templateName
The name of the template to use to render the object.
htmlFieldName
A string that is used to disambiguate the names of HTML input elements that are rendered for properties that have the same name.
additionalViewData
An anonymous object that can contain additional view data that will be merged into the ViewDataDictionary instance that is created for the template.
Returns
An HTML input element for each property in the object that is represented by the expression.
Applies to