InputTagHelper InputTagHelper InputTagHelper Class


ITagHelper implementation targeting <input> elements with an asp-for attribute.

[Microsoft.AspNetCore.Razor.TagHelpers.HtmlTargetElement("input", Attributes="asp-for", TagStructure=Microsoft.AspNetCore.Razor.TagHelpers.TagStructure.WithoutEndTag)]
public class InputTagHelper : Microsoft.AspNetCore.Razor.TagHelpers.TagHelper
type InputTagHelper = class
    inherit TagHelper
Public Class InputTagHelper
Inherits TagHelper


InputTagHelper(IHtmlGenerator) InputTagHelper(IHtmlGenerator) InputTagHelper(IHtmlGenerator)

Creates a new InputTagHelper.


For For For

An expression to be evaluated against the current model.

Format Format Format

The format string (see used to format the For result. Sets the generated "value" attribute to that formatted string.

Generator Generator Generator
InputTypeName InputTypeName InputTypeName

The type of the <input> element.

Name Name Name

The name of the <input> element.

Order Order Order
Value Value Value

The value of the <input> element.

ViewContext ViewContext ViewContext


GetInputType(ModelExplorer, String) GetInputType(ModelExplorer, String) GetInputType(ModelExplorer, String)

Gets an <input> element's "type" attribute value based on the given modelExplorer or InputType.

Init(TagHelperContext) Init(TagHelperContext) Init(TagHelperContext)

Initializes the ITagHelper with the given context. Additions to Items should be done within this method to ensure they're added prior to executing the children.

(Inherited from TagHelper)
Process(TagHelperContext, TagHelperOutput) Process(TagHelperContext, TagHelperOutput) Process(TagHelperContext, TagHelperOutput)
ProcessAsync(TagHelperContext, TagHelperOutput) ProcessAsync(TagHelperContext, TagHelperOutput) ProcessAsync(TagHelperContext, TagHelperOutput)

Asynchronously executes the TagHelper with the given context and output.

(Inherited from TagHelper)

Applies to