将 URL 作为前缀,转换"~ 网站 /"或"~sitecollection/"到相对于服务器的 URL。
命名空间: Microsoft.SharePoint.Utilities
程序集: Microsoft.SharePoint(位于 Microsoft.SharePoint.dll 中)
语法
声明
Public Shared Function GetServerRelativeUrlFromPrefixedUrl ( _
prefixedUrl As String _
) As String
用法
Dim prefixedUrl As String
Dim returnValue As String
returnValue = SPUtility.GetServerRelativeUrlFromPrefixedUrl(prefixedUrl)
public static string GetServerRelativeUrlFromPrefixedUrl(
string prefixedUrl
)
参数
prefixedUrl
类型:System.String前缀的 URL。
返回值
类型:System.String
包含相对于服务器的 URL 的字符串
备注
如果不以开始prefixedUrl参数"~ 网站 /"或"~sitecollection/",则将返回不做任何修改。