HtmlHelperDisplayExtensions.Display HtmlHelperDisplayExtensions.Display HtmlHelperDisplayExtensions.Display Method

Definition

Overloads

Display(IHtmlHelper, String) Display(IHtmlHelper, String) Display(IHtmlHelper, String)

Returns HTML markup for the expression, using a display template. The template is found using the expression's ModelMetadata.

Display(IHtmlHelper, String, Object) Display(IHtmlHelper, String, Object) Display(IHtmlHelper, String, Object)

Returns HTML markup for the expression, using a display template and specified additional view data. The template is found using the expression's ModelMetadata.

Display(IHtmlHelper, String, String) Display(IHtmlHelper, String, String) Display(IHtmlHelper, String, String)

Returns HTML markup for the expression, using a display template. The template is found using the templateName or the expression's ModelMetadata.

Display(IHtmlHelper, String, String, Object) Display(IHtmlHelper, String, String, Object) Display(IHtmlHelper, String, String, Object)

Returns HTML markup for the expression, using a display template and specified additional view data. The template is found using the templateName or the expression's ModelMetadata.

Display(IHtmlHelper, String, String, String) Display(IHtmlHelper, String, String, String) Display(IHtmlHelper, String, String, String)

Returns HTML markup for the expression, using a display template and specified HTML field name. The template is found using the templateName or the expression'sModelMetadata.

Display(IHtmlHelper, String) Display(IHtmlHelper, String) Display(IHtmlHelper, String)

Returns HTML markup for the expression, using a display template. The template is found using the expression's ModelMetadata.

public static Microsoft.AspNetCore.Html.IHtmlContent Display (this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, string expression);
static member Display : Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper * string -> Microsoft.AspNetCore.Html.IHtmlContent
<Extension()>
Public Function Display (htmlHelper As IHtmlHelper, expression As String) As IHtmlContent

Parameters

htmlHelper
IHtmlHelper IHtmlHelper IHtmlHelper

The IHtmlHelper instance this method extends.

expression
String String String

Expression name, relative to the current model. May identify a single property or an Object that contains the properties to display.

Returns

A new IHtmlContent containing the created HTML.

Remarks

For example the default Object display template includes markup for each property in the expression's value.

Example expressions include string.Empty which identifies the current model and "prop" which identifies the current model's "prop" property.

Custom templates are found under a DisplayTemplates folder. The folder name is case-sensitive on case-sensitive file systems.

Display(IHtmlHelper, String, Object) Display(IHtmlHelper, String, Object) Display(IHtmlHelper, String, Object)

Returns HTML markup for the expression, using a display template and specified additional view data. The template is found using the expression's ModelMetadata.

public static Microsoft.AspNetCore.Html.IHtmlContent Display (this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, string expression, object additionalViewData);
static member Display : Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper * string * obj -> Microsoft.AspNetCore.Html.IHtmlContent
<Extension()>
Public Function Display (htmlHelper As IHtmlHelper, expression As String, additionalViewData As Object) As IHtmlContent

Parameters

htmlHelper
IHtmlHelper IHtmlHelper IHtmlHelper

The IHtmlHelper instance this method extends.

expression
String String String

Expression name, relative to the current model. May identify a single property or an Object that contains the properties to display.

additionalViewData
Object Object Object

An anonymous Object or IDictionary<TKey,TValue> that can contain additional view data that will be merged into the ViewDataDictionary<TModel> instance created for the template.

Returns

A new IHtmlContent containing the created HTML.

Remarks

For example the default Object display template includes markup for each property in the expression's value.

Example expressions include string.Empty which identifies the current model and "prop" which identifies the current model's "prop" property.

Custom templates are found under a DisplayTemplates folder. The folder name is case-sensitive on case-sensitive file systems.

Display(IHtmlHelper, String, String) Display(IHtmlHelper, String, String) Display(IHtmlHelper, String, String)

Returns HTML markup for the expression, using a display template. The template is found using the templateName or the expression's ModelMetadata.

public static Microsoft.AspNetCore.Html.IHtmlContent Display (this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, string expression, string templateName);
static member Display : Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper * string * string -> Microsoft.AspNetCore.Html.IHtmlContent
<Extension()>
Public Function Display (htmlHelper As IHtmlHelper, expression As String, templateName As String) As IHtmlContent

Parameters

htmlHelper
IHtmlHelper IHtmlHelper IHtmlHelper

The IHtmlHelper instance this method extends.

expression
String String String

Expression name, relative to the current model. May identify a single property or an Object that contains the properties to display.

templateName
String String String

The name of the template used to create the HTML markup.

Returns

A new IHtmlContent containing the created HTML.

Remarks

For example the default Object display template includes markup for each property in the expression's value.

Example expressions include string.Empty which identifies the current model and "prop" which identifies the current model's "prop" property.

Custom templates are found under a DisplayTemplates folder. The folder name is case-sensitive on case-sensitive file systems.

Display(IHtmlHelper, String, String, Object) Display(IHtmlHelper, String, String, Object) Display(IHtmlHelper, String, String, Object)

Returns HTML markup for the expression, using a display template and specified additional view data. The template is found using the templateName or the expression's ModelMetadata.

public static Microsoft.AspNetCore.Html.IHtmlContent Display (this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, string expression, string templateName, object additionalViewData);
static member Display : Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper * string * string * obj -> Microsoft.AspNetCore.Html.IHtmlContent
<Extension()>
Public Function Display (htmlHelper As IHtmlHelper, expression As String, templateName As String, additionalViewData As Object) As IHtmlContent

Parameters

htmlHelper
IHtmlHelper IHtmlHelper IHtmlHelper

The IHtmlHelper instance this method extends.

expression
String String String

Expression name, relative to the current model. May identify a single property or an Object that contains the properties to display.

templateName
String String String

The name of the template used to create the HTML markup.

additionalViewData
Object Object Object

An anonymous Object or IDictionary<TKey,TValue> that can contain additional view data that will be merged into the ViewDataDictionary<TModel> instance created for the template.

Returns

A new IHtmlContent containing the created HTML.

Remarks

For example the default Object display template includes markup for each property in the expression's value.

Example expressions include string.Empty which identifies the current model and "prop" which identifies the current model's "prop" property.

Custom templates are found under a DisplayTemplates folder. The folder name is case-sensitive on case-sensitive file systems.

Display(IHtmlHelper, String, String, String) Display(IHtmlHelper, String, String, String) Display(IHtmlHelper, String, String, String)

Returns HTML markup for the expression, using a display template and specified HTML field name. The template is found using the templateName or the expression'sModelMetadata.

public static Microsoft.AspNetCore.Html.IHtmlContent Display (this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, string expression, string templateName, string htmlFieldName);
static member Display : Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper * string * string * string -> Microsoft.AspNetCore.Html.IHtmlContent
<Extension()>
Public Function Display (htmlHelper As IHtmlHelper, expression As String, templateName As String, htmlFieldName As String) As IHtmlContent

Parameters

htmlHelper
IHtmlHelper IHtmlHelper IHtmlHelper

The IHtmlHelper instance this method extends.

expression
String String String

Expression name, relative to the current model. May identify a single property or an Object that contains the properties to display.

templateName
String String String

The name of the template used to create the HTML markup.

htmlFieldName
String String String

A String used to disambiguate the names of HTML elements that are created for properties that have the same name.

Returns

A new IHtmlContent containing the created HTML.

Remarks

For example the default Object display template includes markup for each property in the expression's value.

Example expressions include string.Empty which identifies the current model and "prop" which identifies the current model's "prop" property.

Custom templates are found under a DisplayTemplates folder. The folder name is case-sensitive on case-sensitive file systems.

Applies to