HtmlHelper.Display(String, String, String, Object) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Returns HTML markup for the expression
, using a display template, specified HTML field
name, and additional view data. The template is found using the templateName
or the
expression
's ModelMetadata.
public:
virtual Microsoft::AspNetCore::Html::IHtmlContent ^ Display(System::String ^ expression, System::String ^ templateName, System::String ^ htmlFieldName, System::Object ^ additionalViewData);
public Microsoft.AspNetCore.Html.IHtmlContent Display (string expression, string templateName, string htmlFieldName, object additionalViewData);
abstract member Display : string * string * string * obj -> Microsoft.AspNetCore.Html.IHtmlContent
override this.Display : string * string * string * obj -> Microsoft.AspNetCore.Html.IHtmlContent
Public Function Display (expression As String, templateName As String, htmlFieldName As String, additionalViewData As Object) As IHtmlContent
Parameters
- expression
- String
Expression name, relative to the current model. May identify a single property or an Object that contains the properties to display.
- templateName
- String
The name of the template used to create the HTML markup.
- htmlFieldName
- String
A String used to disambiguate the names of HTML elements that are created for properties that have the same name.
- additionalViewData
- 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.