InputTagHelper InputTagHelper InputTagHelper Class

Definition

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
Inheritance
InputTagHelperInputTagHelperInputTagHelper
Attributes

Constructors

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

Creates a new InputTagHelper.

Properties

For For For

An expression to be evaluated against the current model.

Format Format Format

The format string (see https://msdn.microsoft.com/en-us/library/txafckwd.aspx) 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

Methods

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