网站左侧快速启动栏中创建一个新的节点目录:

private SPNavigationNode CreateNavigation(string strTitle, string url, SPWeb web)
{
web.AllowUnsafeUpdates
= true;
SPNavigationNode newNode
= new SPNavigationNode(strTitle,"", true);
web.Navigation.QuickLaunch.AddAsFirst(newNode);
newNode.Update();
web.Update();
web.AllowUnsafeUpdates
= false;
return newNode;
}
posted on 2011-06-03 16:31  Roy Cao  阅读(171)  评论(0)    收藏  举报