SPFile.ServerRelativeUrl property
取得以伺服器的 URL 為基礎的檔案相對 URL。
Namespace: Microsoft.SharePoint
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Syntax
'宣告
Public ReadOnly Property ServerRelativeUrl As String
Get
'用途
Dim instance As SPFile
Dim value As String
value = instance.ServerRelativeUrl
public string ServerRelativeUrl { get; }
Property value
Type: System.String
字串,包含 URL。
備註
ServerRelativeUrl屬性傳回一個字串在下列的表單中,排除伺服器或根資料夾的名稱: /Site_Name/Subsite_Name/Folder_Name/File_Name。
Microsoft SharePoint Foundation中所使用的 Url 的形式的相關資訊,請參閱Guidelines for Using the Object Model。