InputTagHelper InputTagHelper InputTagHelper 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
type InputTagHelper = class
    inherit TagHelper
Public Class InputTagHelper
Inherits TagHelper
Inheritance
InputTagHelperInputTagHelperInputTagHelperInputTagHelper
Attributes

Constructors

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

Creates a new InputTagHelper.

Properties

For For For For

An expression to be evaluated against the current model.

Format 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 Generator

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

InputTypeName InputTypeName InputTypeName InputTypeName

The type of the <input> element.

Name Name Name Name

The name of the <input> element.

Order Order Order Order
Value Value Value Value

The value of the <input> element.

ViewContext ViewContext ViewContext ViewContext

Gets the ViewContext of the executing view.

Methods

GetInputType(ModelExplorer, String) 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) 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) Process(TagHelperContext, TagHelperOutput)
ProcessAsync(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