SPWeb.GetServerRelativeUrlFromUrl 方法
Given a full, server relative or web relative url, returns a server relative url that always starts with a slash.
命名空间: Microsoft.SharePoint
程序集: Microsoft.SharePoint(位于 Microsoft.SharePoint.dll 中)
语法
声明
Public Function GetServerRelativeUrlFromUrl ( _
fullOrRelativeUrl As String _
) As String
用法
Dim instance As SPWeb
Dim fullOrRelativeUrl As String
Dim returnValue As String
returnValue = instance.GetServerRelativeUrlFromUrl(fullOrRelativeUrl)
public string GetServerRelativeUrlFromUrl(
string fullOrRelativeUrl
)
参数
fullOrRelativeUrl
类型:System.StringCanonicalized full, server relative, or web relative url. To canonicalize the url it should be passed to Utility.CanonicalizeFullOrRelativeUrl(). Incoming url can be 1. - web relative i.e. it doesnt start with a / 2. - server relative i.e. it starts with a / 3. - full url i.e. it starts with http or https
返回值
类型:System.String
Canonicalized server relative url that may or may not be valid.