File.ServerRelativeUrl 屬性
取得以伺服器的 URL 為基礎的檔案相對 URL。
命名空間: Microsoft.SharePoint.Client
組件: Microsoft.SharePoint.Client.Silverlight (在 Microsoft.SharePoint.Client.Silverlight.dll 中); Microsoft.SharePoint.Client.Phone (在 Microsoft.SharePoint.Client.Phone.dll 中) Microsoft.SharePoint.Client (在 Microsoft.SharePoint.Client.dll 中)
語法
'宣告
Public ReadOnly Property ServerRelativeUrl As String
Get
'用途
Dim instance As File
Dim value As String
value = instance.ServerRelativeUrl
public string ServerRelativeUrl { get; }
屬性值
類型:System.String
包含 URL 的字串。
例外狀況
例外狀況 | 條件 |
---|---|
[System.UnauthorizedAccessException] | 目前的使用者會有足夠的權限。錯誤碼 ︰-2147024891。 |
備註
ServerRelativeUrl屬性會傳回字串在下列的表單中,排除伺服器或根資料夾的名稱: /Site_Name/Subsite_Name/Folder_Name/File_Name。
它不能null 參考 (未執行任何動作 於 Visual Basic 中)。它必須相對表單伺服器的 URL。