SPUtility.GetFullUrl method
傳回指定的伺服器相對 URL 絕對的通用資源定位器 (URL)。
Namespace: Microsoft.SharePoint.Utilities
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Syntax
'宣告
Public Shared Function GetFullUrl ( _
Site As SPSite, _
WebUrl As String _
) As String
'用途
Dim Site As SPSite
Dim WebUrl As String
Dim returnValue As String
returnValue = SPUtility.GetFullUrl(Site, _
WebUrl)
public static string GetFullUrl(
SPSite Site,
string WebUrl
)
參數
Site
Type: Microsoft.SharePoint.SPSiteMicrosoft.SharePoint.SPSite物件,代表該網站。
WebUrl
Type: System.StringA string that contains the server-relative URL. For example, /[sites/]//. For information about the usage of URLs in Microsoft SharePoint Foundation, see Forms of URL Strings.
傳回值
Type: System.String
包含絕對 URL 字串。
備註
非預設連接埠上執行指定的網站,將會傳回 URL 中包含的連接埠號碼。例如,如果站台是連接埠 81"/documents/File_Name.aspx"傳遞做為WebUrl值,傳回的 URL 將表單中"http://Server_Name: 81/文件/File_Name.aspx"。