Table of Contents

Class EditorExtensions

Namespace
System.Web.Mvc.Html
Assembly
System.Web.Mvc.dll

Represents support for the HTML input element in an application.

public static class EditorExtensions
Inheritance
EditorExtensions
Inherited Members

Methods

Editor(HtmlHelper, string)

Returns an HTML input element for each property in the object that is represented by the expression.

public static MvcHtmlString Editor(this HtmlHelper html, string expression)

Parameters

html HtmlHelper

The HTML helper instance that this method extends.

expression string

An expression that identifies the object that contains the properties to display.

Returns

MvcHtmlString

An HTML input element for each property in the object that is represented by the expression.

Editor(HtmlHelper, string, object)

Returns an HTML input element for each property in the object that is represented by the expression, using additional view data.

public static MvcHtmlString Editor(this HtmlHelper html, string expression, object additionalViewData)

Parameters

html HtmlHelper

The HTML helper instance that this method extends.

expression string

An expression that identifies the object that contains the properties to display.

additionalViewData object

An anonymous object that can contain additional view data that will be merged into the ViewDataDictionary<TModel> instance that is created for the template.

Returns

MvcHtmlString

An HTML input element for each property in the object that is represented by the expression.

Editor(HtmlHelper, string, string)

Returns an HTML input element for each property in the object that is represented by the expression, using the specified template.

public static MvcHtmlString Editor(this HtmlHelper html, string expression, string templateName)

Parameters

html HtmlHelper

The HTML helper instance that this method extends.

expression string

An expression that identifies the object that contains the properties to display.

templateName string

The name of the template to use to render the object.

Returns

MvcHtmlString

An HTML input element for each property in the object that is represented by the expression.

Editor(HtmlHelper, string, string, object)

Returns an HTML input element for each property in the object that is represented by the expression, using the specified template and additional view data.

public static MvcHtmlString Editor(this HtmlHelper html, string expression, string templateName, object additionalViewData)

Parameters

html HtmlHelper

The HTML helper instance that this method extends.

expression string

An expression that identifies the object that contains the properties to display.

templateName string

The name of the template to use to render the object.

additionalViewData object

An anonymous object that can contain additional view data that will be merged into the ViewDataDictionary<TModel> instance that is created for the template.

Returns

MvcHtmlString

An HTML input element for each property in the object that is represented by the expression.

Editor(HtmlHelper, string, string, string)

Returns an HTML input element for each property in the object that is represented by the expression, using the specified template and HTML field name.

public static MvcHtmlString Editor(this HtmlHelper html, string expression, string templateName, string htmlFieldName)

Parameters

html HtmlHelper

The HTML helper instance that this method extends.

expression string

An expression that identifies the object that contains the properties to display.

templateName string

The name of the template to use to render the object.

htmlFieldName string

A string that is used to disambiguate the names of HTML input elements that are rendered for properties that have the same name.

Returns

MvcHtmlString

An HTML input element for each property in the object that is represented by the expression.

Editor(HtmlHelper, string, string, string, object)

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 MvcHtmlString Editor(this HtmlHelper html, string expression, string templateName, string htmlFieldName, object additionalViewData)

Parameters

html HtmlHelper

The HTML helper instance that this method extends.

expression string

An expression that identifies the object that contains the properties to display.

templateName string

The name of the template to use to render the object.

htmlFieldName string

A string that is used to disambiguate the names of HTML input elements that are rendered for properties that have the same name.

additionalViewData object

An anonymous object that can contain additional view data that will be merged into the ViewDataDictionary<TModel> instance that is created for the template.

Returns

MvcHtmlString

An HTML input element for each property in the object that is represented by the expression.

EditorForModel(HtmlHelper)

Returns an HTML input element for each property in the model.

public static MvcHtmlString EditorForModel(this HtmlHelper html)

Parameters

html HtmlHelper

The HTML helper instance that this method extends.

Returns

MvcHtmlString

An HTML input element for each property in the model.

EditorForModel(HtmlHelper, object)

Returns an HTML input element for each property in the model, using additional view data.

public static MvcHtmlString EditorForModel(this HtmlHelper html, object additionalViewData)

Parameters

html HtmlHelper

The HTML helper instance that this method extends.

additionalViewData object

An anonymous object that can contain additional view data that will be merged into the ViewDataDictionary<TModel> instance that is created for the template.

Returns

MvcHtmlString

An HTML input element for each property in the model.

EditorForModel(HtmlHelper, string)

Returns an HTML input element for each property in the model, using the specified template.

public static MvcHtmlString EditorForModel(this HtmlHelper html, string templateName)

Parameters

html HtmlHelper

The HTML helper instance that this method extends.

templateName string

The name of the template to use to render the object.

Returns

MvcHtmlString

An HTML input element for each property in the model and in the specified template.

EditorForModel(HtmlHelper, string, object)

Returns an HTML input element for each property in the model, using the specified template and additional view data.

public static MvcHtmlString EditorForModel(this HtmlHelper html, string templateName, object additionalViewData)

Parameters

html HtmlHelper

The HTML helper instance that this method extends.

templateName string

The name of the template to use to render the object.

additionalViewData object

An anonymous object that can contain additional view data that will be merged into the ViewDataDictionary<TModel> instance that is created for the template.

Returns

MvcHtmlString

An HTML input element for each property in the model.

EditorForModel(HtmlHelper, string, string)

Returns an HTML input element for each property in the model, using the specified template name and HTML field name.

public static MvcHtmlString EditorForModel(this HtmlHelper html, string templateName, string htmlFieldName)

Parameters

html HtmlHelper

The HTML helper instance that this method extends.

templateName string

The name of the template to use to render the object.

htmlFieldName string

A string that is used to disambiguate the names of HTML input elements that are rendered for properties that have the same name.

Returns

MvcHtmlString

An HTML input element for each property in the model and in the named template.

EditorForModel(HtmlHelper, string, string, object)

Returns an HTML input element for each property in the model, using the template name, HTML field name, and additional view data.

public static MvcHtmlString EditorForModel(this HtmlHelper html, string templateName, string htmlFieldName, object additionalViewData)

Parameters

html HtmlHelper

The HTML helper instance that this method extends.

templateName string

The name of the template to use to render the object.

htmlFieldName string

A string that is used to disambiguate the names of HTML input elements that are rendered for properties that have the same name.

additionalViewData object

An anonymous object that can contain additional view data that will be merged into the ViewDataDictionary<TModel> instance that is created for the template.

Returns

MvcHtmlString

An HTML input element for each property in the model.

EditorFor<TModel, TValue>(HtmlHelper<TModel>, Expression<Func<TModel, TValue>>)

Returns an HTML input element for each property in the object that is represented by the Expression expression.

public static MvcHtmlString EditorFor<TModel, TValue>(this HtmlHelper<TModel> html, Expression<Func<TModel, TValue>> expression)

Parameters

html HtmlHelper<TModel>

The HTML helper instance that this method extends.

expression Expression<Func<TModel, TValue>>

An expression that identifies the object that contains the properties to display.

Returns

MvcHtmlString

An HTML input element for each property in the object that is represented by the expression.

Type Parameters

TModel

The type of the model.

TValue

The type of the value.

EditorFor<TModel, TValue>(HtmlHelper<TModel>, Expression<Func<TModel, TValue>>, object)

Returns an HTML input element for each property in the object that is represented by the expression, using additional view data.

public static MvcHtmlString EditorFor<TModel, TValue>(this HtmlHelper<TModel> html, Expression<Func<TModel, TValue>> expression, object additionalViewData)

Parameters

html HtmlHelper<TModel>

The HTML helper instance that this method extends.

expression Expression<Func<TModel, TValue>>

An expression that identifies the object that contains the properties to display.

additionalViewData object

An anonymous object that can contain additional view data that will be merged into the ViewDataDictionary<TModel> instance that is created for the template.

Returns

MvcHtmlString

An HTML input element for each property in the object that is represented by the expression.

Type Parameters

TModel

The type of the model.

TValue

The type of the value.

EditorFor<TModel, TValue>(HtmlHelper<TModel>, Expression<Func<TModel, TValue>>, string)

Returns an HTML input element for each property in the object that is represented by the Expression expression, using the specified template.

public static MvcHtmlString EditorFor<TModel, TValue>(this HtmlHelper<TModel> html, Expression<Func<TModel, TValue>> expression, string templateName)

Parameters

html HtmlHelper<TModel>

The HTML helper instance that this method extends.

expression Expression<Func<TModel, TValue>>

An expression that identifies the object that contains the properties to display.

templateName string

The name of the template to use to render the object.

Returns

MvcHtmlString

An HTML input element for each property in the object that is represented by the expression.

Type Parameters

TModel

The type of the model.

TValue

The type of the value.

EditorFor<TModel, TValue>(HtmlHelper<TModel>, Expression<Func<TModel, TValue>>, string, object)

Returns an HTML input element for each property in the object that is represented by the expression, using the specified template and additional view data.

public static MvcHtmlString EditorFor<TModel, TValue>(this HtmlHelper<TModel> html, Expression<Func<TModel, TValue>> expression, string templateName, object additionalViewData)

Parameters

html HtmlHelper<TModel>

The HTML helper instance that this method extends.

expression Expression<Func<TModel, TValue>>

An expression that identifies the object that contains the properties to display.

templateName string

The name of the template to use to render the object.

additionalViewData object

An anonymous object that can contain additional view data that will be merged into the ViewDataDictionary<TModel> instance that is created for the template.

Returns

MvcHtmlString

An HTML input element for each property in the object that is represented by the expression.

Type Parameters

TModel

The type of the model.

TValue

The type of the value.

EditorFor<TModel, TValue>(HtmlHelper<TModel>, Expression<Func<TModel, TValue>>, string, string)

Returns an HTML input element for each property in the object that is represented by the Expression expression, using the specified template and HTML field name.

public static MvcHtmlString EditorFor<TModel, TValue>(this HtmlHelper<TModel> html, Expression<Func<TModel, TValue>> expression, string templateName, string htmlFieldName)

Parameters

html HtmlHelper<TModel>

The HTML helper instance that this method extends.

expression Expression<Func<TModel, TValue>>

An expression that identifies the object that contains the properties to display.

templateName string

The name of the template to use to render the object.

htmlFieldName string

A string that is used to disambiguate the names of HTML input elements that are rendered for properties that have the same name.

Returns

MvcHtmlString

An HTML input element for each property in the object that is represented by the expression.

Type Parameters

TModel

The type of the model.

TValue

The type of the value.

EditorFor<TModel, TValue>(HtmlHelper<TModel>, Expression<Func<TModel, TValue>>, string, string, object)

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 MvcHtmlString EditorFor<TModel, TValue>(this HtmlHelper<TModel> html, Expression<Func<TModel, TValue>> expression, string templateName, string htmlFieldName, object additionalViewData)

Parameters

html HtmlHelper<TModel>

The HTML helper instance that this method extends.

expression Expression<Func<TModel, TValue>>

An expression that identifies the object that contains the properties to display.

templateName string

The name of the template to use to render the object.

htmlFieldName string

A string that is used to disambiguate the names of HTML input elements that are rendered for properties that have the same name.

additionalViewData object

An anonymous object that can contain additional view data that will be merged into the ViewDataDictionary<TModel> instance that is created for the template.

Returns

MvcHtmlString

An HTML input element for each property in the object that is represented by the expression.

Type Parameters

TModel

The type of the model.

TValue

The type of the value.