UrlResolutionTagHelper.TryResolveUrl 方法

定义

重载

TryResolveUrl(String, IHtmlContent)

尝试解析相对于应用程序的“webroot”设置的给定 url 值。

TryResolveUrl(String, String)

尝试解析相对于应用程序的“webroot”设置的给定 url 值。

TryResolveUrl(String, IHtmlContent)

Source:
UrlResolutionTagHelper.cs
Source:
UrlResolutionTagHelper.cs
Source:
UrlResolutionTagHelper.cs

尝试解析相对于应用程序的“webroot”设置的给定 url 值。

protected:
 bool TryResolveUrl(System::String ^ url, [Runtime::InteropServices::Out] Microsoft::AspNetCore::Html::IHtmlContent ^ % resolvedUrl);
protected bool TryResolveUrl (string url, out Microsoft.AspNetCore.Html.IHtmlContent resolvedUrl);
protected bool TryResolveUrl (string url, out Microsoft.AspNetCore.Html.IHtmlContent? resolvedUrl);
member this.TryResolveUrl : string * IHtmlContent -> bool
Protected Function TryResolveUrl (url As String, ByRef resolvedUrl As IHtmlContent) As Boolean

参数

url
String

要解析的 URL。

resolvedUrl
IHtmlContent

以应用程序的虚拟根开头的绝对 URL。 null 如果 url 无法解决,则为 。

返回

true 如果可以解析 , url 则为 ; false 否则为 。

适用于

TryResolveUrl(String, String)

Source:
UrlResolutionTagHelper.cs
Source:
UrlResolutionTagHelper.cs
Source:
UrlResolutionTagHelper.cs

尝试解析相对于应用程序的“webroot”设置的给定 url 值。

protected:
 bool TryResolveUrl(System::String ^ url, [Runtime::InteropServices::Out] System::String ^ % resolvedUrl);
protected bool TryResolveUrl (string url, out string resolvedUrl);
protected bool TryResolveUrl (string url, out string? resolvedUrl);
member this.TryResolveUrl : string * string -> bool
Protected Function TryResolveUrl (url As String, ByRef resolvedUrl As String) As Boolean

参数

url
String

要解析的 URL。

resolvedUrl
String

以应用程序的虚拟根开头的绝对 URL。 null 如果 url 无法解决,则为 。

返回

true 如果可以解析 , url 则为 ; false 否则为 。

适用于