InputTagHelper Class

Definition

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

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

Constructors

InputTagHelper(IHtmlGenerator)

Creates a new InputTagHelper.

Properties

For

An expression to be evaluated against the current model.

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

Gets the IHtmlGenerator used to generate the InputTagHelper's output.

InputTypeName

The type of the <input> element.

Name

The name of the <input> element.

Order
Value

The value of the <input> element.

ViewContext

Gets the ViewContext of the executing view.

Methods

GetInputType(ModelExplorer, String)

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

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)

Synchronously executes the TagHelper with the given context and output.

ProcessAsync(TagHelperContext, TagHelperOutput)

Asynchronously executes the TagHelper with the given context and output.

(Inherited from TagHelper)

Applies to