Hi All,
i have got a site that has 10 Documment Libararies with each containing 10 items.how can i able to retrieve unique ID's of the documents in these Doc Libraries.Please help.
Regards,
Sivapratap
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Karthik Muthu KaruppanPosted Jan 26, 2015, 5:46 PM
Abhay ShankerPosted May 22, 2014, 6:24 AM
SPListCollection collLists = oWebsite.Lists;
foreach (SPList oList in collLists)
{
if (oList.BaseType == SPBaseType.DocumentLibrary)
{
SPDocumentLibrary oDocumentLibrary = (SPDocumentLibrary)oList;
if (!oDocumentLibrary.IsCatalog && oList.BaseTemplate !=
SPListTemplateType.XMLForm)
{
SPListItemCollection collListItems = oDocumentLibrary.Items;
foreach (SPListItem oListItem in collListItems)
{
//Write your code for documentid
//string DocID = oListItem.Properties["_dlc_DocId"].ToString();
}
}
}
}
sivapratap KurapatiPosted May 22, 2014, 6:06 AM
Abhay ShankerPosted May 22, 2014, 6:02 AM
sivapratap KurapatiPosted May 22, 2014, 5:59 AM
Abhay ShankerPosted May 22, 2014, 5:44 AM