Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 7589

Get parent folder using client object model

$
0
0

In my program, I have information about list item:

List list1 = ctx.Web.Lists.GetByTitle("testLib");
ListItem listItem = list1.GetItemById(3);                 
ctx.Load(list1);
ctx.Load(listItem, w => w.DisplayName, w => w.FileSystemObjectType);
ctx.ExecuteQuery();

I need to know does this list item belong to a folder, i.e. I need to know name of his parent folder (or maybe it doesn't have a parent folder). How can I do that??


Viewing all articles
Browse latest Browse all 7589

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>