网站左侧快速启动栏中创建一个新的节点目录:
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;
}
{
web.AllowUnsafeUpdates = true;
SPNavigationNode newNode = new SPNavigationNode(strTitle,"", true);
web.Navigation.QuickLaunch.AddAsFirst(newNode);
newNode.Update();
web.Update();
web.AllowUnsafeUpdates = false;
return newNode;
}