AnchorTagHelper AnchorTagHelper AnchorTagHelper Class

Definition

ITagHelper implementation targeting <a> elements.

[Microsoft.AspNetCore.Razor.TagHelpers.HtmlTargetElement("a", Attributes="asp-action")]
[Microsoft.AspNetCore.Razor.TagHelpers.HtmlTargetElement("a", Attributes="asp-controller")]
[Microsoft.AspNetCore.Razor.TagHelpers.HtmlTargetElement("a", Attributes="asp-area")]
[Microsoft.AspNetCore.Razor.TagHelpers.HtmlTargetElement("a", Attributes="asp-fragment")]
[Microsoft.AspNetCore.Razor.TagHelpers.HtmlTargetElement("a", Attributes="asp-host")]
[Microsoft.AspNetCore.Razor.TagHelpers.HtmlTargetElement("a", Attributes="asp-protocol")]
[Microsoft.AspNetCore.Razor.TagHelpers.HtmlTargetElement("a", Attributes="asp-route")]
[Microsoft.AspNetCore.Razor.TagHelpers.HtmlTargetElement("a", Attributes="asp-all-route-data")]
[Microsoft.AspNetCore.Razor.TagHelpers.HtmlTargetElement("a", Attributes="asp-route-*")]
[Microsoft.AspNetCore.Razor.TagHelpers.HtmlTargetElement("a", Attributes="asp-page")]
[Microsoft.AspNetCore.Razor.TagHelpers.HtmlTargetElement("a", Attributes="asp-page-handler")]
public class AnchorTagHelper : Microsoft.AspNetCore.Razor.TagHelpers.TagHelper
type AnchorTagHelper = class
    inherit TagHelper
Public Class AnchorTagHelper
Inherits TagHelper
Inheritance
AnchorTagHelperAnchorTagHelperAnchorTagHelper
Attributes

Constructors

AnchorTagHelper(IHtmlGenerator) AnchorTagHelper(IHtmlGenerator) AnchorTagHelper(IHtmlGenerator)

Creates a new AnchorTagHelper.

Properties

Action Action Action

The name of the action method.

Area Area Area

The name of the area.

Controller Controller Controller

The name of the controller.

Fragment Fragment Fragment

The URL fragment name.

Generator Generator Generator
Host Host Host

The host name.

Order Order Order
Page Page Page

The name of the page.

PageHandler PageHandler PageHandler

The name of the page handler.

Protocol Protocol Protocol

The protocol for the URL, such as "http" or "https".

Route Route Route

Name of the route.

RouteValues RouteValues RouteValues

Additional parameters for the route.

ViewContext ViewContext ViewContext

Gets or sets the ViewContext for the current request.

Methods

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