共用方式為


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。

適用於