Compartir a través de


AnchorTagHelper Clase

Definición

ITagHelper implementación dirigida a <un> elemento .

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
Herencia
AnchorTagHelper
Atributos

Constructores

AnchorTagHelper(IHtmlGenerator)

Crea un nuevo AnchorTagHelper.

Propiedades

Action

El nombre del método de acción.

Area

El nombre del área.

Controller

El nombre del controlador.

Fragment

Nombre del fragmento de dirección URL.

Generator

Obtiene el objeto IHtmlGenerator utilizado para generar la AnchorTagHelpersalida de .

Host

El nombre de host.

Order

Cuando se ejecuta un conjunto de ITagHelpers, sus Init(TagHelperContext)se invocan primero en el especificado Order; a continuación, sus ProcessAsync(TagHelperContext, TagHelperOutput)se invocan en el especificado Order. Los valores más bajos se ejecutan primero.

Page

Nombre de la página.

PageHandler

Nombre del controlador de página.

Protocol

Protocolo de la dirección URL, como "http" o "https".

Route

Nombre de la ruta.

RouteValues

Parámetros adicionales para la ruta.

ViewContext

Obtiene o establece el objeto ViewContext para la solicitud actual.

Métodos

Init(TagHelperContext)

Inicializa con ITagHelper el especificado context. Las adiciones a Items deben realizarse dentro de este método para asegurarse de que se agregan antes de ejecutar los elementos secundarios.

(Heredado de TagHelper)
Process(TagHelperContext, TagHelperOutput)

Ejecuta sincrónicamente con los context especificados TagHelper y output.

ProcessAsync(TagHelperContext, TagHelperOutput)

Ejecuta de forma asincrónica el TagHelper objeto con los context especificados y output.

(Heredado de TagHelper)

Se aplica a