Control.ResolveClientUrl(String) Control.ResolveClientUrl(String) Control.ResolveClientUrl(String) Control.ResolveClientUrl(String) Method

定義

取得瀏覽器可使用的 URL。Gets a URL that can be used by the browser.

public:
 virtual System::String ^ ResolveClientUrl(System::String ^ relativeUrl);
public string ResolveClientUrl (string relativeUrl);
abstract member ResolveClientUrl : string -> string
override this.ResolveClientUrl : string -> string
Public Function ResolveClientUrl (relativeUrl As String) As String

參數

relativeUrl
String String String String

相對於目前頁面的 URL。A URL relative to the current page.

傳回

適合瀏覽器使用、指定之資源的完整 URL。A fully qualified URL to the specified resource suitable for use on the browser.

實作

例外狀況

備註

使用ResolveClientUrl方法,以傳回 URL 字串適用於用戶端來存取資源的 Web 伺服器上,例如影像檔連結至其他頁面,並依此類推。Use the ResolveClientUrl method to return a URL string suitable for use by the client to access resources on the Web server, such as image files, links to additional pages, and so on.

注意

這個方法所傳回的 URL 會相對於包含控制項具現化的原始程式檔的資料夾。The URL returned by this method is relative to the folder containing the source file in which the control is instantiated. 控制項繼承這個屬性,例如UserControlMasterPage,會傳回相對於控制項的完整的 URL。Controls that inherit this property, such as UserControl and MasterPage, will return a fully qualified URL relative to the control.

適用於