foreach(SPListItem item in Items) { SPFile fItem= item.Web.GetFile(item.Url); SPFolder folder = fItem.ParentFolder; }
All things SharePoint! This blog specializes in Microsoft SharePoint technologies, including web parts, development, configuration, customization, and best practices
How to get the folder of SPListItem?
Need to get the item's parent folder in an event/feature receiver? The code snippet below seems to be the most practical way to do that.
1 comments
Labels:
C#,
SharePoint Object Model,
SPFolder
Subscribe to:
Posts (Atom)