0

I know the URL to a document Library folder and I am able to successfully retrieve that folder using Client Object Model GetFolder. However, I do not know the Document Library title, how can I get the metadata of the Document Library that the folder I am on is in? I can C# or vb.net.

1 Answer 1

0

I am assuming that your code to GetFolder would be something like below, if yes then the code to get Document library title would be as follows:

string url = web.ServerRelativeUrl + "/shared documents/test folder";
SPFolder folder = web.GetFolder(url);
var docLibTitle = folder.Item.ParentList.Title;
1
  • Thank you; however, the code provided is for SharePoint Object Model. I am using the Client Object Model it uses: sp.Folder Folder = web.GetFolderByServerRelativeUrl(url library name); after getting the folder Item is not available nor ParentList.
    – pardark
    Commented Nov 22, 2016 at 21:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.