返回指定的相对于服务器的 url 的绝对的统一资源定位器 (URL)。
命名空间: Microsoft.SharePoint.Utilities
程序集: Microsoft.SharePoint(位于 Microsoft.SharePoint.dll 中)
语法
声明
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
类型:Microsoft.SharePoint.SPSite一个表示该网站的Microsoft.SharePoint.SPSite对象。
WebUrl
类型:System.StringA string that contains the server-relative URL. For example, /[sites/]//. For information about the usage of URLs in Microsoft SharePoint Foundation, see SharePoint 2013 中的 URL 和标记.
返回值
类型:System.String
一个字符串,包含的绝对 URL。
备注
如果在非默认端口上运行指定的网站,将返回 URL 中包括端口号。例如,如果网站是在端口 81 上和"/documents/File_Name.aspx"作为WebUrl值传递,返回的 URL 将为窗体中"http://服务器名称: 81 中的文档/File_Name.aspx"。