SPFile.ServerRelativeUrl 属性

基于服务器的 URL 获取文件的相对 URL。

命名空间:  Microsoft.SharePoint
程序集:  Microsoft.SharePoint(位于 Microsoft.SharePoint.dll 中)

语法

声明
Public ReadOnly Property ServerRelativeUrl As String
    Get
用法
Dim instance As SPFile
Dim value As String

value = instance.ServerRelativeUrl
public string ServerRelativeUrl { get; }

属性值

类型:System.String
一个包含 URL 的字符串。

备注

ServerRelativeUrl属性返回一个字符串,以下面的形式,其中不包括根文件夹的服务器的名称: /Site_Name/Subsite_Name/Folder_Name/File_Name。

在Microsoft SharePoint Foundation中使用的 Url 的形式有关的信息,请参阅Guidelines for Using the Object Model。

另请参阅

引用

SPFile 类

SPFile 成员

Microsoft.SharePoint 命名空间