Tuesday, 20 March 2012

Create folder in sharepoint library programmatically
using
{

{
(SPSite osite =new SPSite("http://igrid103:2345"))using (SPWeb oweb = osite.OpenWeb())try{
oweb.AllowUnsafeUpdates =


libfolder.Add(
olist.Update();
oweb.AllowUnsafeUpdates =

}

{

}
}

}
true;SPList olist = oweb.Lists.TryGetList("Shared Documents");SPFolderCollection libfolder = olist.RootFolder.SubFolders;"http://igrid103:2345/Shared%20Documents/MyFolder/"+"subfolder");false;Console.WriteLine("Folder created sucessfully");catch (Exception ex)throw ex;Console.ReadLine();

No comments:

Post a Comment