IUrlResolutionService 介面

定義

定義物件實作的服務,根據內容資訊,解析相對 URL。Defines a service implemented by objects to resolve relative URLs based on contextual information.

public interface class IUrlResolutionService
public interface IUrlResolutionService
type IUrlResolutionService = interface
Public Interface IUrlResolutionService
衍生

備註

此介面會定義用來解析 URL 路徑的服務。This interface defines the service that is used to resolve URL paths. IUrlResolutionService介面是用來解析包含 ~ 運算子的相對路徑和路徑。The IUrlResolutionService interface is used for resolving relative paths and paths that contain the ~ operator. 參考資源的伺服器控制項可以透過 ~ 運算子來定義資源的路徑,這表示目前應用程式的根目錄。Server controls that reference resources can define the paths to the resources through the ~ operator, which represents the root of the current application. 如果傳遞給瀏覽器,包含 ~ 運算子的路徑將無法運作。A path containing the ~ operator will not work if passed to the browser. 伺服器控制項必須先將路徑轉換成絕對路徑或相對路徑,才能將其傳遞至瀏覽器。The server control must convert the path to an absolute or relative path before passing it to the browser.

Control 會執行這個介面。Control implements this interface. 衍生自的控制項 Control 可能會覆寫此實作為,以提供 url 的自訂解析。A control that derives from Control could override this implementation to provide customized resolution of URLs.

方法

ResolveClientUrl(String)

傳回適合用戶端使用的已解析 URL。Returns a resolved URL that is suitable for use by the client.

適用於