UrlResolutionTagHelper Klasa

Definicja

ITagHelper implementacja elementów docelowych zawierających atrybuty z oczekiwanymi wartościami adresu URL.

public ref class UrlResolutionTagHelper : Microsoft::AspNetCore::Razor::TagHelpers::TagHelper
[Microsoft.AspNetCore.Razor.TagHelpers.HtmlTargetElement("*", Attributes="[itemid^='~/']")]
[Microsoft.AspNetCore.Razor.TagHelpers.HtmlTargetElement("a", Attributes="[href^='~/']")]
[Microsoft.AspNetCore.Razor.TagHelpers.HtmlTargetElement("applet", Attributes="[archive^='~/']")]
[Microsoft.AspNetCore.Razor.TagHelpers.HtmlTargetElement("area", Attributes="[href^='~/']", TagStructure=Microsoft.AspNetCore.Razor.TagHelpers.TagStructure.WithoutEndTag)]
[Microsoft.AspNetCore.Razor.TagHelpers.HtmlTargetElement("audio", Attributes="[src^='~/']")]
[Microsoft.AspNetCore.Razor.TagHelpers.HtmlTargetElement("base", Attributes="[href^='~/']", TagStructure=Microsoft.AspNetCore.Razor.TagHelpers.TagStructure.WithoutEndTag)]
[Microsoft.AspNetCore.Razor.TagHelpers.HtmlTargetElement("blockquote", Attributes="[cite^='~/']")]
[Microsoft.AspNetCore.Razor.TagHelpers.HtmlTargetElement("button", Attributes="[formaction^='~/']")]
[Microsoft.AspNetCore.Razor.TagHelpers.HtmlTargetElement("del", Attributes="[cite^='~/']")]
[Microsoft.AspNetCore.Razor.TagHelpers.HtmlTargetElement("embed", Attributes="[src^='~/']", TagStructure=Microsoft.AspNetCore.Razor.TagHelpers.TagStructure.WithoutEndTag)]
[Microsoft.AspNetCore.Razor.TagHelpers.HtmlTargetElement("form", Attributes="[action^='~/']")]
[Microsoft.AspNetCore.Razor.TagHelpers.HtmlTargetElement("html", Attributes="[manifest^='~/']")]
[Microsoft.AspNetCore.Razor.TagHelpers.HtmlTargetElement("iframe", Attributes="[src^='~/']")]
[Microsoft.AspNetCore.Razor.TagHelpers.HtmlTargetElement("img", Attributes="[src^='~/']", TagStructure=Microsoft.AspNetCore.Razor.TagHelpers.TagStructure.WithoutEndTag)]
[Microsoft.AspNetCore.Razor.TagHelpers.HtmlTargetElement("img", Attributes="[srcset^='~/']", TagStructure=Microsoft.AspNetCore.Razor.TagHelpers.TagStructure.WithoutEndTag)]
[Microsoft.AspNetCore.Razor.TagHelpers.HtmlTargetElement("input", Attributes="[src^='~/']", TagStructure=Microsoft.AspNetCore.Razor.TagHelpers.TagStructure.WithoutEndTag)]
[Microsoft.AspNetCore.Razor.TagHelpers.HtmlTargetElement("input", Attributes="[formaction^='~/']", TagStructure=Microsoft.AspNetCore.Razor.TagHelpers.TagStructure.WithoutEndTag)]
[Microsoft.AspNetCore.Razor.TagHelpers.HtmlTargetElement("ins", Attributes="[cite^='~/']")]
[Microsoft.AspNetCore.Razor.TagHelpers.HtmlTargetElement("link", Attributes="[href^='~/']", TagStructure=Microsoft.AspNetCore.Razor.TagHelpers.TagStructure.WithoutEndTag)]
[Microsoft.AspNetCore.Razor.TagHelpers.HtmlTargetElement("menuitem", Attributes="[icon^='~/']")]
[Microsoft.AspNetCore.Razor.TagHelpers.HtmlTargetElement("object", Attributes="[archive^='~/']")]
[Microsoft.AspNetCore.Razor.TagHelpers.HtmlTargetElement("object", Attributes="[data^='~/']")]
[Microsoft.AspNetCore.Razor.TagHelpers.HtmlTargetElement("q", Attributes="[cite^='~/']")]
[Microsoft.AspNetCore.Razor.TagHelpers.HtmlTargetElement("script", Attributes="[src^='~/']")]
[Microsoft.AspNetCore.Razor.TagHelpers.HtmlTargetElement("source", Attributes="[src^='~/']", TagStructure=Microsoft.AspNetCore.Razor.TagHelpers.TagStructure.WithoutEndTag)]
[Microsoft.AspNetCore.Razor.TagHelpers.HtmlTargetElement("source", Attributes="[srcset^='~/']", TagStructure=Microsoft.AspNetCore.Razor.TagHelpers.TagStructure.WithoutEndTag)]
[Microsoft.AspNetCore.Razor.TagHelpers.HtmlTargetElement("track", Attributes="[src^='~/']", TagStructure=Microsoft.AspNetCore.Razor.TagHelpers.TagStructure.WithoutEndTag)]
[Microsoft.AspNetCore.Razor.TagHelpers.HtmlTargetElement("video", Attributes="[src^='~/']")]
[Microsoft.AspNetCore.Razor.TagHelpers.HtmlTargetElement("video", Attributes="[poster^='~/']")]
public class UrlResolutionTagHelper : Microsoft.AspNetCore.Razor.TagHelpers.TagHelper
[<Microsoft.AspNetCore.Razor.TagHelpers.HtmlTargetElement("*", Attributes="[itemid^='~/']")>]
[<Microsoft.AspNetCore.Razor.TagHelpers.HtmlTargetElement("a", Attributes="[href^='~/']")>]
[<Microsoft.AspNetCore.Razor.TagHelpers.HtmlTargetElement("applet", Attributes="[archive^='~/']")>]
[<Microsoft.AspNetCore.Razor.TagHelpers.HtmlTargetElement("area", Attributes="[href^='~/']", TagStructure=Microsoft.AspNetCore.Razor.TagHelpers.TagStructure.WithoutEndTag)>]
[<Microsoft.AspNetCore.Razor.TagHelpers.HtmlTargetElement("audio", Attributes="[src^='~/']")>]
[<Microsoft.AspNetCore.Razor.TagHelpers.HtmlTargetElement("base", Attributes="[href^='~/']", TagStructure=Microsoft.AspNetCore.Razor.TagHelpers.TagStructure.WithoutEndTag)>]
[<Microsoft.AspNetCore.Razor.TagHelpers.HtmlTargetElement("blockquote", Attributes="[cite^='~/']")>]
[<Microsoft.AspNetCore.Razor.TagHelpers.HtmlTargetElement("button", Attributes="[formaction^='~/']")>]
[<Microsoft.AspNetCore.Razor.TagHelpers.HtmlTargetElement("del", Attributes="[cite^='~/']")>]
[<Microsoft.AspNetCore.Razor.TagHelpers.HtmlTargetElement("embed", Attributes="[src^='~/']", TagStructure=Microsoft.AspNetCore.Razor.TagHelpers.TagStructure.WithoutEndTag)>]
[<Microsoft.AspNetCore.Razor.TagHelpers.HtmlTargetElement("form", Attributes="[action^='~/']")>]
[<Microsoft.AspNetCore.Razor.TagHelpers.HtmlTargetElement("html", Attributes="[manifest^='~/']")>]
[<Microsoft.AspNetCore.Razor.TagHelpers.HtmlTargetElement("iframe", Attributes="[src^='~/']")>]
[<Microsoft.AspNetCore.Razor.TagHelpers.HtmlTargetElement("img", Attributes="[src^='~/']", TagStructure=Microsoft.AspNetCore.Razor.TagHelpers.TagStructure.WithoutEndTag)>]
[<Microsoft.AspNetCore.Razor.TagHelpers.HtmlTargetElement("img", Attributes="[srcset^='~/']", TagStructure=Microsoft.AspNetCore.Razor.TagHelpers.TagStructure.WithoutEndTag)>]
[<Microsoft.AspNetCore.Razor.TagHelpers.HtmlTargetElement("input", Attributes="[src^='~/']", TagStructure=Microsoft.AspNetCore.Razor.TagHelpers.TagStructure.WithoutEndTag)>]
[<Microsoft.AspNetCore.Razor.TagHelpers.HtmlTargetElement("input", Attributes="[formaction^='~/']", TagStructure=Microsoft.AspNetCore.Razor.TagHelpers.TagStructure.WithoutEndTag)>]
[<Microsoft.AspNetCore.Razor.TagHelpers.HtmlTargetElement("ins", Attributes="[cite^='~/']")>]
[<Microsoft.AspNetCore.Razor.TagHelpers.HtmlTargetElement("link", Attributes="[href^='~/']", TagStructure=Microsoft.AspNetCore.Razor.TagHelpers.TagStructure.WithoutEndTag)>]
[<Microsoft.AspNetCore.Razor.TagHelpers.HtmlTargetElement("menuitem", Attributes="[icon^='~/']")>]
[<Microsoft.AspNetCore.Razor.TagHelpers.HtmlTargetElement("object", Attributes="[archive^='~/']")>]
[<Microsoft.AspNetCore.Razor.TagHelpers.HtmlTargetElement("object", Attributes="[data^='~/']")>]
[<Microsoft.AspNetCore.Razor.TagHelpers.HtmlTargetElement("q", Attributes="[cite^='~/']")>]
[<Microsoft.AspNetCore.Razor.TagHelpers.HtmlTargetElement("script", Attributes="[src^='~/']")>]
[<Microsoft.AspNetCore.Razor.TagHelpers.HtmlTargetElement("source", Attributes="[src^='~/']", TagStructure=Microsoft.AspNetCore.Razor.TagHelpers.TagStructure.WithoutEndTag)>]
[<Microsoft.AspNetCore.Razor.TagHelpers.HtmlTargetElement("source", Attributes="[srcset^='~/']", TagStructure=Microsoft.AspNetCore.Razor.TagHelpers.TagStructure.WithoutEndTag)>]
[<Microsoft.AspNetCore.Razor.TagHelpers.HtmlTargetElement("track", Attributes="[src^='~/']", TagStructure=Microsoft.AspNetCore.Razor.TagHelpers.TagStructure.WithoutEndTag)>]
[<Microsoft.AspNetCore.Razor.TagHelpers.HtmlTargetElement("video", Attributes="[src^='~/']")>]
[<Microsoft.AspNetCore.Razor.TagHelpers.HtmlTargetElement("video", Attributes="[poster^='~/']")>]
type UrlResolutionTagHelper = class
    inherit TagHelper
Public Class UrlResolutionTagHelper
Inherits TagHelper
Dziedziczenie
UrlResolutionTagHelper
Pochodne
Atrybuty

Uwagi

Rozwiązuje adresy URL rozpoczynające się od "~/" (względem ustawienia "webroot" aplikacji), które nie są objęte przez inne ITagHelperelementy. Uruchamia się przed innymi ITagHelper, aby upewnić się, że adresy URL względne dla aplikacji są rozwiązywane.

Konstruktory

UrlResolutionTagHelper(IUrlHelperFactory, HtmlEncoder)

Tworzy nowy adres UrlResolutionTagHelper.

Właściwości

HtmlEncoder

Element HtmlEncoder.

Order

Gdy zestaw s ITagHelperjest wykonywany, ich Init(TagHelperContext)'s są najpierw wywoływane w określonym Order; następnie ich ProcessAsync(TagHelperContext, TagHelperOutput)'s są wywoływane w określonym Order. Niższe wartości są najpierw wykonywane.

UrlHelperFactory

Element IUrlHelperFactory.

ViewContext

Element ViewContext.

Metody

Init(TagHelperContext)

Inicjuje element ITagHelper przy użyciu podanego context. Dodatki należy wykonać Items w ramach tej metody, aby upewnić się, że zostały dodane przed wykonaniem elementów podrzędnych.

(Odziedziczone po TagHelper)
Process(TagHelperContext, TagHelperOutput)

Synchronicznie wykonuje element TagHelper z daną context wartością i output.

ProcessAsync(TagHelperContext, TagHelperOutput)

Asynchronicznie wykonuje element TagHelper z daną context wartością i output.

(Odziedziczone po TagHelper)
ProcessUrlAttribute(String, TagHelperOutput)

Rozpoznaje i aktualizuje wartości adresu URL rozpoczynające się od "~/" (względem ustawienia "webroot" aplikacji) dla "outputs, których Name wartość to attributeNameAttributes .

TryResolveUrl(String, IHtmlContent)

Próbuje rozpoznać daną url wartość względem ustawienia "webroot" aplikacji.

TryResolveUrl(String, String)

Próbuje rozpoznać daną url wartość względem ustawienia "webroot" aplikacji.

Dotyczy