SelectTagHelper SelectTagHelper SelectTagHelper Class

Definition

ITagHelper implementation targeting <select> elements with asp-for and/or asp-items attribute(s).

[Microsoft.AspNetCore.Razor.TagHelpers.HtmlTargetElement("select", Attributes="asp-for")]
[Microsoft.AspNetCore.Razor.TagHelpers.HtmlTargetElement("select", Attributes="asp-items")]
public class SelectTagHelper : Microsoft.AspNetCore.Razor.TagHelpers.TagHelper
type SelectTagHelper = class
    inherit TagHelper
Public Class SelectTagHelper
Inherits TagHelper
Inheritance
SelectTagHelperSelectTagHelperSelectTagHelper
Attributes

Constructors

SelectTagHelper(IHtmlGenerator) SelectTagHelper(IHtmlGenerator) SelectTagHelper(IHtmlGenerator)

Creates a new SelectTagHelper.

Properties

For For For

An expression to be evaluated against the current model.

Generator Generator Generator
Items Items Items

A collection of SelectListItem objects used to populate the <select> element with <optgroup> and <option> elements.

Name Name Name

The name of the <input> element.

Order Order Order
ViewContext ViewContext ViewContext

Methods

Init(TagHelperContext) Init(TagHelperContext) Init(TagHelperContext)
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