获取sharepoint列表中文件的服务器相对URL

rak*_*los 0 c# sharepoint

如何从Sharepoint中的代码获取文档库中文件的服务器相对URL?

Joh*_*ino 8

这是你想要的?

item.File.ServerRelativeUrl
Run Code Online (Sandbox Code Playgroud)

或者如果你不使用文件:

item[SPBuiltInFieldId.FileRef].ToString();
Run Code Online (Sandbox Code Playgroud)