SelectTagHelper Class

Definition

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

public ref class SelectTagHelper : Microsoft::AspNetCore::Razor::TagHelpers::TagHelper
[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
SelectTagHelper
Attributes

Constructors

SelectTagHelper(IHtmlGenerator)

Creates a new SelectTagHelper.

Properties

For

An expression to be evaluated against the current model.

Generator

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

Items

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

Name

The name of the <input> element.

Order
ViewContext

Gets the ViewContext of the executing view.

Methods

Init(TagHelperContext)
Process(TagHelperContext, TagHelperOutput)
ProcessAsync(TagHelperContext, TagHelperOutput)

Asynchronously executes the TagHelper with the given context and output.

(Inherited from TagHelper)

Applies to