Monday, August 03, 2009

Retrieve the attachments of List Item

To retrieve the attachment, access the folder object of the item and then read the files

SPFolder folder = Web.Folders["Lists"].SubFolders[listName];

folder = folder.SubFolders["Attachments"].SubFolders[itemNo];
foreach (SPFile file in folder.Files)
{
}

0 comments: