Share via


DisplayExtensions.DisplayForModel Method

Definition

Overloads

DisplayForModel(HtmlHelper)

Returns HTML markup for each property in the model.

DisplayForModel(HtmlHelper, Object)

Returns HTML markup for each property in the model, using additional view data.

DisplayForModel(HtmlHelper, String)

Returns HTML markup for each property in the model using the specified template.

DisplayForModel(HtmlHelper, String, Object)

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

DisplayForModel(HtmlHelper, String, String)

Returns HTML markup for each property in the model using the specified template and HTML field ID.

DisplayForModel(HtmlHelper, String, String, Object)

Returns HTML markup for each property in the model, using the specified template, an HTML field ID, and additional view data.

DisplayForModel(HtmlHelper)

Returns HTML markup for each property in the model.

public static System.Web.Mvc.MvcHtmlString DisplayForModel (this System.Web.Mvc.HtmlHelper html);
static member DisplayForModel : System.Web.Mvc.HtmlHelper -> System.Web.Mvc.MvcHtmlString
<Extension()>
Public Function DisplayForModel (html As HtmlHelper) As MvcHtmlString

Parameters

html
HtmlHelper

The HTML helper instance that this method extends.

Returns

The HTML markup for each property in the model.

Applies to

DisplayForModel(HtmlHelper, Object)

Returns HTML markup for each property in the model, using additional view data.

public static System.Web.Mvc.MvcHtmlString DisplayForModel (this System.Web.Mvc.HtmlHelper html, object additionalViewData);
static member DisplayForModel : System.Web.Mvc.HtmlHelper * obj -> System.Web.Mvc.MvcHtmlString
<Extension()>
Public Function DisplayForModel (html As HtmlHelper, additionalViewData As Object) As MvcHtmlString

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

The HTML markup for each property in the model.

Applies to

DisplayForModel(HtmlHelper, String)

Returns HTML markup for each property in the model using the specified template.

public static System.Web.Mvc.MvcHtmlString DisplayForModel (this System.Web.Mvc.HtmlHelper html, string templateName);
static member DisplayForModel : System.Web.Mvc.HtmlHelper * string -> System.Web.Mvc.MvcHtmlString
<Extension()>
Public Function DisplayForModel (html As HtmlHelper, templateName As String) As MvcHtmlString

Parameters

html
HtmlHelper

The HTML helper instance that this method extends.

templateName
String

The name of the template that is used to render the object.

Returns

The HTML markup for each property in the model.

Applies to

DisplayForModel(HtmlHelper, String, Object)

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

public static System.Web.Mvc.MvcHtmlString DisplayForModel (this System.Web.Mvc.HtmlHelper html, string templateName, object additionalViewData);
static member DisplayForModel : System.Web.Mvc.HtmlHelper * string * obj -> System.Web.Mvc.MvcHtmlString
<Extension()>
Public Function DisplayForModel (html As HtmlHelper, templateName As String, additionalViewData As Object) As MvcHtmlString

Parameters

html
HtmlHelper

The HTML helper instance that this method extends.

templateName
String

The name of the template that is used 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

The HTML markup for each property in the model.

Applies to

DisplayForModel(HtmlHelper, String, String)

Returns HTML markup for each property in the model using the specified template and HTML field ID.

public static System.Web.Mvc.MvcHtmlString DisplayForModel (this System.Web.Mvc.HtmlHelper html, string templateName, string htmlFieldName);
static member DisplayForModel : System.Web.Mvc.HtmlHelper * string * string -> System.Web.Mvc.MvcHtmlString
<Extension()>
Public Function DisplayForModel (html As HtmlHelper, templateName As String, htmlFieldName As String) As MvcHtmlString

Parameters

html
HtmlHelper

The HTML helper instance that this method extends.

templateName
String

The name of the template that is used 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

The HTML markup for each property in the model.

Applies to

DisplayForModel(HtmlHelper, String, String, Object)

Returns HTML markup for each property in the model, using the specified template, an HTML field ID, and additional view data.

public static System.Web.Mvc.MvcHtmlString DisplayForModel (this System.Web.Mvc.HtmlHelper html, string templateName, string htmlFieldName, object additionalViewData);
static member DisplayForModel : System.Web.Mvc.HtmlHelper * string * string * obj -> System.Web.Mvc.MvcHtmlString
<Extension()>
Public Function DisplayForModel (html As HtmlHelper, templateName As String, htmlFieldName As String, additionalViewData As Object) As MvcHtmlString

Parameters

html
HtmlHelper

The HTML helper instance that this method extends.

templateName
String

The name of the template that is used 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

The HTML markup for each property in the model.

Applies to