Sign in
Google apps
Main menu
Post a Comment On:
Blogpad
"Adding a folder to a Sharepoint list"
No comments yet. -
1 – 0 of 0
From
http://blogs.msdn.com/adamhems/archive/2007/08/30/progammatically-adding-folders-to-a-sharepoint-list.aspx
string siteUrl = "http://sample.development.com/sales/prospects";
string listName = "Shared Documents";
SPSite siteCollection = new SPSite(siteUrl);
SPWeb site = siteCollection.OpenWeb();
SPList list = site.Lists[listName];
SPListItem folder = list.Items.Add(list.RootFolder.ServerRelativeUrl, SPFileSystemObjectType.Folder, null);
if (folder != null)
{
folder["Name"] = "NameofFolder";
folder.Update();
}
posted by fc at
6:49 PM
on Nov 22, 2007
Leave your comment
You can use some HTML tags, such as
<b>, <i>, <a>
This blog does not allow anonymous comments.
Google Account
You will be asked to sign in after submitting your comment.
Please prove you're not a robot
"Adding a folder to a Sharepoint list"
No comments yet. -