IHtmlHelper Interface

Base HTML helpers.

Namespace
Microsoft.AspNetCore.Mvc.Rendering
Assemblies
  • Microsoft.AspNetCore.Mvc.ViewFeatures

Syntax

public interface IHtmlHelper
interface Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper

Methods

Returns an anchor (<a>) element that contains a URL path to the specified action.

Arguments:
  • linkText (System.String) – The inner text of the anchor element. Must not be <code>null</code>.
  • actionName (System.String) – The name of the action.
  • controllerName (System.String) – The name of the controller.
  • protocol (System.String) – The protocol for the URL, such as “http” or “https”.
  • hostname (System.String) – The host name for the URL.
  • fragment (System.String) – The URL fragment name (the anchor name).
  • routeValues (System.Object) – An System.Object that contains the parameters for a route. The parameters are retrieved through reflection by examining the properties of the System.Object. This System.Object is typically created using System.Object initializer syntax. Alternatively, an System.Collections.Generic.IDictionary`2 instance containing the route parameters.
  • htmlAttributes (System.Object) – An System.Object that contains the HTML attributes for the element. Alternatively, an System.Collections.Generic.IDictionary`2 instance containing the HTML attributes.
Return type:

Microsoft.AspNetCore.Html.IHtmlContent

Returns:

A new Microsoft.AspNetCore.Html.IHtmlContent containing the anchor element.

IHtmlContent ActionLink(string linkText, string actionName, string controllerName, string protocol, string hostname, string fragment, object routeValues, object htmlAttributes)
AntiForgeryToken()

Returns a <hidden> element (antiforgery token) that will be validated when the containing <form> is submitted.

Return type:Microsoft.AspNetCore.Html.IHtmlContent
Returns:Microsoft.AspNetCore.Html.IHtmlContent containing the <hidden> element.
IHtmlContent AntiForgeryToken()
BeginForm(System.String, System.String, System.Object, Microsoft.AspNetCore.Mvc.Rendering.FormMethod, System.Nullable<System.Boolean>, System.Object)

Renders a <form> start tag to the response. When the user submits the form, the action with name <em>actionName</em> will process the request.

Arguments:
  • actionName (System.String) – The name of the action method.
  • controllerName (System.String) – The name of the controller.
  • routeValues (System.Object) – An System.Object that contains the parameters for a route. The parameters are retrieved through reflection by examining the properties of the System.Object. This System.Object is typically created using System.Object initializer syntax. Alternatively, an System.Collections.Generic.IDictionary`2 instance containing the route parameters.
  • method (Microsoft.AspNetCore.Mvc.Rendering.FormMethod) – The HTTP method for processing the form, either GET or POST.
  • antiforgery (System.Nullable<System.Boolean>) – If <code>true</code>, <form> elements will include an antiforgery token. If <code>false</code>, suppresses the generation an <input> of type “hidden” with an antiforgery token. If <code>null</code>, <form> elements will include an antiforgery token only if <em>method</em> is not Microsoft.AspNetCore.Mvc.Rendering.FormMethod.Get.
  • htmlAttributes (System.Object) – An System.Object that contains the HTML attributes for the element. Alternatively, an System.Collections.Generic.IDictionary`2 instance containing the HTML attributes.
Return type:

Microsoft.AspNetCore.Mvc.Rendering.MvcForm

Returns:

An Microsoft.AspNetCore.Mvc.Rendering.MvcForm instance which renders the </form> end tag when disposed.

MvcForm BeginForm(string actionName, string controllerName, object routeValues, FormMethod method, bool ? antiforgery, object htmlAttributes)
BeginRouteForm(System.String, System.Object, Microsoft.AspNetCore.Mvc.Rendering.FormMethod, System.Nullable<System.Boolean>, System.Object)

Renders a <form> start tag to the response. The route with name <em>routeName</em> generates the <form>’s <code>action</code> attribute value.

Arguments:
  • routeName (System.String) – The name of the route.
  • routeValues (System.Object) – An System.Object that contains the parameters for a route. The parameters are retrieved through reflection by examining the properties of the System.Object. This System.Object is typically created using System.Object initializer syntax. Alternatively, an System.Collections.Generic.IDictionary`2 instance containing the route parameters.
  • method (Microsoft.AspNetCore.Mvc.Rendering.FormMethod) – The HTTP method for processing the form, either GET or POST.
  • antiforgery (System.Nullable<System.Boolean>) – If <code>true</code>, <form> elements will include an antiforgery token. If <code>false</code>, suppresses the generation an <input> of type “hidden” with an antiforgery token. If <code>null</code>, <form> elements will include an antiforgery token only if <em>method</em> is not Microsoft.AspNetCore.Mvc.Rendering.FormMethod.Get.
  • htmlAttributes (System.Object) – An System.Object that contains the HTML attributes for the element. Alternatively, an System.Collections.Generic.IDictionary`2 instance containing the HTML attributes.
Return type:

Microsoft.AspNetCore.Mvc.Rendering.MvcForm

Returns:

An Microsoft.AspNetCore.Mvc.Rendering.MvcForm instance which renders the </form> end tag when disposed.

MvcForm BeginRouteForm(string routeName, object routeValues, FormMethod method, bool ? antiforgery, object htmlAttributes)
CheckBox(System.String, System.Nullable<System.Boolean>, System.Object)

Returns an <input> element of type “checkbox” with value “true” and an <input> element of type “hidden” with value “false”.

Arguments:
  • expression (System.String) – Expression name, relative to the current model.
  • isChecked (System.Nullable<System.Boolean>) – If <code>true</code>, checkbox is initially checked.
  • htmlAttributes (System.Object) – An System.Object that contains the HTML attributes for the checkbox element. Alternatively, an System.Collections.Generic.IDictionary`2 instance containing the HTML attributes.
Return type:

Microsoft.AspNetCore.Html.IHtmlContent

Returns:

A new Microsoft.AspNetCore.Html.IHtmlContent containing the <input> elements.

IHtmlContent CheckBox(string expression, bool ? isChecked, object htmlAttributes)
Display(System.String, System.String, System.String, System.Object)

Returns HTML markup for the <em>expression</em>, using a display template, specified HTML field name, and additional view data. The template is found using the <em>templateName</em> or the <em>expression</em>’s Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata.

Arguments:
  • expression (System.String) – Expression name, relative to the current model. May identify a single property or an System.Object that contains the properties to display.
  • templateName (System.String) – The name of the template used to create the HTML markup.
  • htmlFieldName (System.String) – A System.String used to disambiguate the names of HTML elements that are created for properties that have the same name.
  • additionalViewData (System.Object) – An anonymous System.Object or System.Collections.Generic.IDictionary`2 that can contain additional view data that will be merged into the Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary`1 instance created for the template.
Return type:

Microsoft.AspNetCore.Html.IHtmlContent

Returns:

A new Microsoft.AspNetCore.Html.IHtmlContent containing the created HTML.

IHtmlContent Display(string expression, string templateName, string htmlFieldName, object additionalViewData)
DisplayName(System.String)

Returns the display name for the specified <em>expression</em>.

Arguments:expression (System.String) – Expression name, relative to the current model.
Return type:System.String
Returns:A System.String containing the display name.
string DisplayName(string expression)
DisplayText(System.String)

Returns the simple display text for the specified <em>expression</em>.

Arguments:expression (System.String) – Expression name, relative to the current model.
Return type:System.String
Returns:A System.String containing the simple display text. If the expression result is <code>null</code>, returns Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata.NullDisplayText.
string DisplayText(string expression)
DropDownList(System.String, System.Collections.Generic.IEnumerable<Microsoft.AspNetCore.Mvc.Rendering.SelectListItem>, System.String, System.Object)

Returns a single-selection HTML <select> element for the <em>expression</em>, using the specified list items, option label, and HTML attributes.

Arguments:
  • expression (System.String) – Expression name, relative to the current model.
  • selectList (System.Collections.Generic.IEnumerable<Microsoft.AspNetCore.Mvc.Rendering.SelectListItem>) – A collection of Microsoft.AspNetCore.Mvc.Rendering.SelectListItem objects used to populate the <select> element with <optgroup> and <option> elements.
  • optionLabel (System.String) – The text for a default empty item. Does not include such an item if argument is <code>null</code>.
  • htmlAttributes (System.Object) – An System.Object that contains the HTML attributes for the <select> element. Alternatively, an System.Collections.Generic.IDictionary`2 instance containing the HTML attributes.
Return type:

Microsoft.AspNetCore.Html.IHtmlContent

Returns:

A new Microsoft.AspNetCore.Html.IHtmlContent containing the <select> element.

IHtmlContent DropDownList(string expression, IEnumerable<SelectListItem> selectList, string optionLabel, object htmlAttributes)
Editor(System.String, System.String, System.String, System.Object)

Returns HTML markup for the <em>expression</em>, using an editor template, specified HTML field name, and additional view data. The template is found using the <em>templateName</em> or the <em>expression</em>’s Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata.

Arguments:
  • expression (System.String) – Expression name, relative to the current model. May identify a single property or an System.Object that contains the properties to edit.
  • templateName (System.String) – The name of the template used to create the HTML markup.
  • htmlFieldName (System.String) – A System.String used to disambiguate the names of HTML elements that are created for properties that have the same name.
  • additionalViewData (System.Object) – An anonymous System.Object or System.Collections.Generic.IDictionary`2 that can contain additional view data that will be merged into the Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary`1 instance created for the template.
Return type:

Microsoft.AspNetCore.Html.IHtmlContent

Returns:

A new Microsoft.AspNetCore.Html.IHtmlContent containing the <input> element(s).

IHtmlContent Editor(string expression, string templateName, string htmlFieldName, object additionalViewData)
Encode(System.Object)

Converts the <em>value</em> to an HTML-encoded System.String.

Arguments:value (System.Object) – The System.Object to encode.
Return type:System.String
Returns:The HTML-encoded System.String.
string Encode(object value)
Encode(System.String)

Converts the specified System.String to an HTML-encoded System.String.

Arguments:value (System.String) – The System.String to encode.
Return type:System.String
Returns:The HTML-encoded System.String.
string Encode(string value)
EndForm()

Renders the </form> end tag to the response.

void EndForm()
FormatValue(System.Object, System.String)

Formats the value.

Arguments:
Return type:

System.String

Returns:

A System.String containing the formatted value.

string FormatValue(object value, string format)
GenerateIdFromName(System.String)

Returns an HTML element Id for the specified expression <em>fullName</em>.

Arguments:fullName (System.String) – Fully-qualified expression name, ignoring the current model. Must not be <code>null</code>.
Return type:System.String
Returns:A System.String containing the element Id.
string GenerateIdFromName(string fullName)
GetEnumSelectList(System.Type)

Returns a select list for the given <em>enumType</em>.

Arguments:enumType (System.Type) – System.Type to generate a select list for.
Return type:System.Collections.Generic.IEnumerable<Microsoft.AspNetCore.Mvc.Rendering.SelectListItem>
Returns:An System.Collections.Generic.IEnumerable`1 containing the select list for the given <em>enumType</em>.
IEnumerable<SelectListItem> GetEnumSelectList(Type enumType)
GetEnumSelectList<TEnum>()

Returns a select list for the given <em>TEnum</em>.

Return type:System.Collections.Generic.IEnumerable<Microsoft.AspNetCore.Mvc.Rendering.SelectListItem>
Returns:An System.Collections.Generic.IEnumerable`1 containing the select list for the given <em>TEnum</em>.
IEnumerable<SelectListItem> GetEnumSelectList<TEnum>()where TEnum : struct
Hidden(System.String, System.Object, System.Object)

Returns an <input> element of type “hidden” for the specified <em>expression</em>.

Arguments:
  • expression (System.String) – Expression name, relative to the current model.
  • value (System.Object) – If non-<code>null</code>, value to include in the element.
  • htmlAttributes (System.Object) – An System.Object that contains the HTML attributes for the element. Alternatively, an System.Collections.Generic.IDictionary`2 instance containing the HTML attributes.
Return type:

Microsoft.AspNetCore.Html.IHtmlContent

Returns:

A new Microsoft.AspNetCore.Html.IHtmlContent containing the <input> element.

IHtmlContent Hidden(string expression, object value, object htmlAttributes)
Id(System.String)

Returns the HTML element Id for the specified <em>expression</em>.

Arguments:expression (System.String) – Expression name, relative to the current model.
Return type:System.String
Returns:A System.String containing the element Id.
string Id(string expression)
Label(System.String, System.String, System.Object)

Returns a <label> element for the specified <em>expression</em>.

Arguments:
  • expression (System.String) – Expression name, relative to the current model.
  • labelText (System.String) – The inner text of the element.
  • htmlAttributes (System.Object) – An System.Object that contains the HTML attributes for the element. Alternatively, an System.Collections.Generic.IDictionary`2 instance containing the HTML attributes.
Return type:

Microsoft.AspNetCore.Html.IHtmlContent

Returns:

A new Microsoft.AspNetCore.Html.IHtmlContent containing the <label> element.

IHtmlContent Label(string expression, string labelText, object htmlAttributes)
ListBox(System.String, System.Collections.Generic.IEnumerable<Microsoft.AspNetCore.Mvc.Rendering.SelectListItem>, System.Object)

Returns a multi-selection <select> element for the <em>expression</em>, using the specified list items and HTML attributes.

Arguments:
  • expression (System.String) – Expression name, relative to the current model.
  • selectList (System.Collections.Generic.IEnumerable<Microsoft.AspNetCore.Mvc.Rendering.SelectListItem>) – A collection of Microsoft.AspNetCore.Mvc.Rendering.SelectListItem objects used to populate the <select> element with <optgroup> and <option> elements.
  • htmlAttributes (System.Object) – An System.Object that contains the HTML attributes for the <select> element. Alternatively, an System.Collections.Generic.IDictionary`2 instance containing the HTML attributes.
Return type:

Microsoft.AspNetCore.Html.IHtmlContent

Returns:

A new Microsoft.AspNetCore.Html.IHtmlContent containing the <select> element.

IHtmlContent ListBox(string expression, IEnumerable<SelectListItem> selectList, object htmlAttributes)
Name(System.String)

Returns the full HTML element name for the specified <em>expression</em>.

Arguments:expression (System.String) – Expression name, relative to the current model.
Return type:System.String
Returns:A System.String containing the element name.
string Name(string expression)
PartialAsync(System.String, System.Object, Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary)

Returns HTML markup for the specified partial view.

Arguments:
Return type:

System.Threading.Tasks.Task<Microsoft.AspNetCore.Html.IHtmlContent>

Returns:

A System.Threading.Tasks.Task that on completion returns a new Microsoft.AspNetCore.Html.IHtmlContent instance containing the created HTML.

Task<IHtmlContent> PartialAsync(string partialViewName, object model, ViewDataDictionary viewData)
Password(System.String, System.Object, System.Object)

Returns an <input> element of type “password” for the specified <em>expression</em>.

Arguments:
  • expression (System.String) – Expression name, relative to the current model.
  • value (System.Object) – If non-<code>null</code>, value to include in the element.
  • htmlAttributes (System.Object) – An System.Object that contains the HTML attributes for the element. Alternatively, an System.Collections.Generic.IDictionary`2 instance containing the HTML attributes.
Return type:

Microsoft.AspNetCore.Html.IHtmlContent

Returns:

A new Microsoft.AspNetCore.Html.IHtmlContent containing the <input> element.

IHtmlContent Password(string expression, object value, object htmlAttributes)
RadioButton(System.String, System.Object, System.Nullable<System.Boolean>, System.Object)

Returns an <input> element of type “radio” for the specified <em>expression</em>.

Arguments:
  • expression (System.String) – Expression name, relative to the current model.
  • value (System.Object) – If non-<code>null</code>, value to include in the element. Must not be <code>null</code> if <em>isChecked</em> is also <code>null</code> and no “checked” entry exists in <em>htmlAttributes</em>.
  • isChecked (System.Nullable<System.Boolean>) – If <code>true</code>, radio button is initially selected. Must not be <code>null</code> if <em>value</em> is also <code>null</code> and no “checked” entry exists in <em>htmlAttributes</em>.
  • htmlAttributes (System.Object) – An System.Object that contains the HTML attributes for the element. Alternatively, an System.Collections.Generic.IDictionary`2 instance containing the HTML attributes.
Return type:

Microsoft.AspNetCore.Html.IHtmlContent

Returns:

A new Microsoft.AspNetCore.Html.IHtmlContent containing the <input> element.

IHtmlContent RadioButton(string expression, object value, bool ? isChecked, object htmlAttributes)
Raw(System.Object)

Wraps HTML markup from the string representation of an System.Object in an Microsoft.AspNetCore.Html.HtmlString, without HTML-encoding the string representation.

Arguments:value (System.Object) – The System.Object to wrap.
Return type:Microsoft.AspNetCore.Html.IHtmlContent
Returns:Microsoft.AspNetCore.Html.IHtmlContent containing the wrapped string representation.
IHtmlContent Raw(object value)
Raw(System.String)

Wraps HTML markup in an Microsoft.AspNetCore.Html.HtmlString, without HTML-encoding the specified <em>value</em>.

Arguments:value (System.String) – HTML markup System.String.
Return type:Microsoft.AspNetCore.Html.IHtmlContent
Returns:A new Microsoft.AspNetCore.Html.IHtmlContent containing the wrapped System.String.
IHtmlContent Raw(string value)
RenderPartialAsync(System.String, System.Object, Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary)

Renders HTML markup for the specified partial view.

Arguments:
Return type:

System.Threading.Tasks.Task

Returns:

A System.Threading.Tasks.Task that renders the created HTML when it executes.

Task RenderPartialAsync(string partialViewName, object model, ViewDataDictionary viewData)

Returns an anchor (<a>) element that contains a URL path to the specified route.

Arguments:
  • linkText (System.String) – The inner text of the anchor element. Must not be <code>null</code>.
  • routeName (System.String) – The name of the route.
  • protocol (System.String) – The protocol for the URL, such as “http” or “https”.
  • hostName (System.String) – The host name for the URL.
  • fragment (System.String) – The URL fragment name (the anchor name).
  • routeValues (System.Object) – An System.Object that contains the parameters for a route. The parameters are retrieved through reflection by examining the properties of the System.Object. This System.Object is typically created using System.Object initializer syntax. Alternatively, an System.Collections.Generic.IDictionary`2 instance containing the route parameters.
  • htmlAttributes (System.Object) – An System.Object that contains the HTML attributes for the element. Alternatively, an System.Collections.Generic.IDictionary`2 instance containing the HTML attributes.
Return type:

Microsoft.AspNetCore.Html.IHtmlContent

Returns:

A new Microsoft.AspNetCore.Html.IHtmlContent containing the anchor element.

IHtmlContent RouteLink(string linkText, string routeName, string protocol, string hostName, string fragment, object routeValues, object htmlAttributes)
TextArea(System.String, System.String, System.Int32, System.Int32, System.Object)

Returns a <textarea> element for the specified <em>expression</em>.

Arguments:
  • expression (System.String) – Expression name, relative to the current model.
  • value (System.String) – If non-<code>null</code>, value to include in the element.
  • rows (System.Int32) – Number of rows in the textarea.
  • columns (System.Int32) – Number of columns in the textarea.
  • htmlAttributes (System.Object) – An System.Object that contains the HTML attributes for the element. Alternatively, an System.Collections.Generic.IDictionary`2 instance containing the HTML attributes.
Return type:

Microsoft.AspNetCore.Html.IHtmlContent

Returns:

A new Microsoft.AspNetCore.Html.IHtmlContent containing the <textarea> element.

IHtmlContent TextArea(string expression, string value, int rows, int columns, object htmlAttributes)
TextBox(System.String, System.Object, System.String, System.Object)

Returns an <input> element of type “text” for the specified <em>current</em>.

Arguments:
  • current (System.String) – Expression name, relative to the current model.
  • value (System.Object) – If non-<code>null</code>, value to include in the element.
  • format (System.String) – The composite format System.String (see http://msdn.microsoft.com/en-us/library/txafckwd.aspx).
  • htmlAttributes (System.Object) – An System.Object that contains the HTML attributes for the element. Alternatively, an System.Collections.Generic.IDictionary`2 instance containing the HTML attributes.
Return type:

Microsoft.AspNetCore.Html.IHtmlContent

Returns:

A new Microsoft.AspNetCore.Html.IHtmlContent containing the <input> element.

IHtmlContent TextBox(string current, object value, string format, object htmlAttributes)
ValidationMessage(System.String, System.String, System.Object, System.String)

Returns the validation message if an error exists in the Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary object for the specified <em>expression</em>.

Arguments:
  • expression (System.String) – Expression name, relative to the current model.
  • message (System.String) – The message to be displayed. If <code>null</code> or empty, method extracts an error string from the Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary object. Message will always be visible but client-side validation may update the associated CSS class.
  • htmlAttributes (System.Object) – An System.Object that contains the HTML attributes for the <em>tag</em> element. Alternatively, an System.Collections.Generic.IDictionary`2 instance containing the HTML attributes.
  • tag (System.String) – The tag to wrap the <em>message</em> in the generated HTML. Its default value is Microsoft.AspNetCore.Mvc.Rendering.ViewContext.ValidationMessageElement.
Return type:

Microsoft.AspNetCore.Html.IHtmlContent

Returns:

A new Microsoft.AspNetCore.Html.IHtmlContent containing a <em>tag</em> element. <code>null</code> if the <em>expression</em> is valid and client-side validation is disabled.

IHtmlContent ValidationMessage(string expression, string message, object htmlAttributes, string tag)
ValidationSummary(System.Boolean, System.String, System.Object, System.String)

Returns an unordered list (<ul> element) of validation messages that are in the Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary object.

Arguments:
  • excludePropertyErrors (System.Boolean) – If <code>true</code>, display model-level errors only; otherwise display all errors.
  • message (System.String) – The message to display with the validation summary.
  • htmlAttributes (System.Object) – An System.Object that contains the HTML attributes for the topmost (<div>) element. Alternatively, an System.Collections.Generic.IDictionary`2 instance containing the HTML attributes.
  • tag (System.String) – The tag to wrap the <em>message</em> in the generated HTML. Its default value is Microsoft.AspNetCore.Mvc.Rendering.ViewContext.ValidationSummaryMessageElement.
Return type:

Microsoft.AspNetCore.Html.IHtmlContent

Returns:

New Microsoft.AspNetCore.Html.IHtmlContent containing a <div> element wrapping the <em>tag</em> element and the <ul> element. Microsoft.AspNetCore.Html.HtmlString.Empty if the current model is valid and client-side validation is disabled).

IHtmlContent ValidationSummary(bool excludePropertyErrors, string message, object htmlAttributes, string tag)
Value(System.String, System.String)

Returns the formatted value for the specified <em>expression</em>.

Arguments:
Return type:

System.String

Returns:

A System.String containing the formatted value.

string Value(string expression, string format)

Properties

Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper.Html5DateRenderingMode

Set this property to Microsoft.AspNetCore.Mvc.Rendering.Html5DateRenderingMode.Rfc3339 to have templated helpers such as Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper.Editor(System.String,System.String,System.String,System.Object) and Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper`1.EditorFor``1(System.Linq.Expressions.Expression{System.Func{`0,``0}},System.String,System.String,System.Object) render date and time values as RFC 3339 compliant strings. By default these helpers render dates and times using the current culture.

Return type:Microsoft.AspNetCore.Mvc.Rendering.Html5DateRenderingMode
Html5DateRenderingMode Html5DateRenderingMode { get; set; }
Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper.IdAttributeDotReplacement

Gets the System.String that replaces periods in the ID attribute of an element.

Return type:System.String
string IdAttributeDotReplacement { get; }
Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper.MetadataProvider

Gets the metadata provider. Intended for use in Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper extension methods.

Return type:Microsoft.AspNetCore.Mvc.ModelBinding.IModelMetadataProvider
IModelMetadataProvider MetadataProvider { get; }
Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper.TempData

Gets the current Microsoft.AspNetCore.Mvc.ViewFeatures.ITempDataDictionary instance.

Return type:Microsoft.AspNetCore.Mvc.ViewFeatures.ITempDataDictionary
ITempDataDictionary TempData { get; }
Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper.UrlEncoder

Gets the Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper.UrlEncoder to be used for encoding a URL.

Return type:System.Text.Encodings.Web.UrlEncoder
UrlEncoder UrlEncoder { get; }
Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper.ViewBag

Gets the view bag.

Return type:System.Object
dynamic ViewBag { get; }
Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper.ViewContext

Gets the context information about the view.

Return type:Microsoft.AspNetCore.Mvc.Rendering.ViewContext
ViewContext ViewContext { get; }
Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper.ViewData

Gets the current view data.

Return type:Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary
ViewDataDictionary ViewData { get; }