UrlHelper.GenerateUrl(String, String, VirtualPathData, String) 方法

定义

使用指定的组件生成 URL。

protected:
 virtual System::String ^ GenerateUrl(System::String ^ protocol, System::String ^ host, Microsoft::AspNetCore::Routing::VirtualPathData ^ pathData, System::String ^ fragment);
protected virtual string GenerateUrl (string protocol, string host, Microsoft.AspNetCore.Routing.VirtualPathData pathData, string fragment);
protected virtual string? GenerateUrl (string? protocol, string? host, Microsoft.AspNetCore.Routing.VirtualPathData? pathData, string? fragment);
abstract member GenerateUrl : string * string * Microsoft.AspNetCore.Routing.VirtualPathData * string -> string
override this.GenerateUrl : string * string * Microsoft.AspNetCore.Routing.VirtualPathData * string -> string
override this.GenerateUrl : string * string * Microsoft.AspNetCore.Routing.VirtualPathData * string -> string
Protected Overridable Function GenerateUrl (protocol As String, host As String, pathData As VirtualPathData, fragment As String) As String

参数

protocol
String

URL 协议,如“http”或“https”。

host
String

URL 的主机名。

fragment
String

URL 的片段。

返回

生成的 URL。

适用于