SharePoint

How to create a Folder in Document Library porgrammatically in SharePoint 2010

using (SPSite currentSite = new SPSite(siteUrl))
{
SPWeb web = currentSite.RootWeb;
SPDocumentLibrary documentLibrary = (SPDocumentLibrary)web.Lists["MyDocLibrary"];
SPFolderCollection folderCollection = web.Folders;
folderCollection.Add("http://mas-sp2010:333/MyDocLibrary/MyNewFolder3");
documentLibrary.Update();
}

Standard

Leave a Reply

Your email address will not be published. Required fields are marked *