tags:

views:

538

answers:

1

how can you get the server relative url of a file in a document library from code in Sharepoint?

+6  A: 

Is this what you are looking for?

item.File.ServerRelativeUrl

or if you you don´t work with files:

item[SPBuiltInFieldId.FileRef].ToString();
Johan Leino