AnchorTagHelper Класс

Определение

ITagHelper реализация, <предназначенная для> элементов.

public ref class AnchorTagHelper : Microsoft::AspNetCore::Razor::TagHelpers::TagHelper
[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-*")]
public class AnchorTagHelper : Microsoft.AspNetCore.Razor.TagHelpers.TagHelper
[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
[<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-*")>]
type AnchorTagHelper = class
    inherit TagHelper
[<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")>]
type AnchorTagHelper = class
    inherit TagHelper
Public Class AnchorTagHelper
Inherits TagHelper
Наследование
AnchorTagHelper
Атрибуты

Конструкторы

AnchorTagHelper(IHtmlGenerator)

Создает новый экземпляр AnchorTagHelper.

Свойства

Action

Имя метода действия.

Area

Имя области.

Controller

Имя контроллера.

Fragment

Имя фрагмента URL-адреса.

Generator

Возвращает объект , используемый IHtmlGeneratorAnchorTagHelperдля создания выходных данных.

Host

Имя сервера.

Order

При выполнении ITagHelperInit(TagHelperContext)набора объектов их сначала вызываются в указанном Orderобъекте ; затем их ProcessAsync(TagHelperContext, TagHelperOutput)вызываются в указанном Order. В первую очередь выполняются более низкие значения.

Page

Имя страницы.

PageHandler

Имя обработчика страницы.

Protocol

Протокол для URL-адреса, например "http" или "https".

Route

Имя маршрута.

RouteValues

Дополнительные параметры для маршрута.

ViewContext

Возвращает или задает ViewContext для текущего запроса.

Методы

Init(TagHelperContext)

Инициализирует ITagHelper с заданным context. В этом методе необходимо выполнить дополнения, Items чтобы убедиться, что они добавлены перед выполнением дочерних элементов.

(Унаследовано от TagHelper)
Process(TagHelperContext, TagHelperOutput)

Синхронно выполняет TagHelper с заданными context и output.

ProcessAsync(TagHelperContext, TagHelperOutput)

Асинхронно выполняет TagHelper с заданными context и output.

(Унаследовано от TagHelper)

Применяется к