SharePoint 2010 快速获取item 的父亲 folder
static SPFolder GetParentFolder(SPListItem itemToFind)
{
string FolderURL = itemToFind.Url.Remove(itemToFind.Url.LastIndexOf('/'));
SPFolder myfolder = itemToFind.Web.GetFolder(FolderURL);
try
{
if (myfolder != myfolder.Item.ParentList.RootFolder) return itemToFind.Web.GetFolder(FolderURL);
else return null;
}
catch { return null; }
}