Get File URL from SharePoint

Adrien HUYGENS asked on November 13, 2018 15:29

Hi,

I have a problem, i would like to find a url from a file direcly in my code C#. but i don't find it. i don't want to use Transformation.

Thank you for your help

Recent Answers


Arun Kumar answered on November 14, 2018 12:56 (last edited on November 14, 2018 14:46)

Can you share what you have tried so far? I think to get file from directory you can use simple asp.net functions

var filePath = HttpContext.Current.Server.MapPath(path);

0 votesVote for this answer Mark as a Correct answer

Adrien HUYGENS answered on November 15, 2018 09:50

Thank you for your answer,

Exacly, i have a SharePoint, with a lot of document. ans i need to create a link from document in kentico. i can't use transformation because i need to use 2 transformations.If i can use transformation is easy for find url of file, we juste need to use a macro {%# GetSharePointFileUrl() %}.

i would like use this function in code. thank you for your help

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.