我要从导航sharepoint online 2013中删除导航节点(而不是禁用QuickLaunch
ClientContext context = ClaimClientContext.GetAuthenticatedContext(targetURL, 600, 600);
NavigationNodeCollection collNavNode = context.Web.Navigation.QuickLaunch;
context.Load(collNavNode);
foreach (SP.NavigationNode node in collNavNode)
{
node.DeleteObject();
}
context.ExecuteQuery();这不管用。
发布于 2014-01-26 18:27:44
如何使用SharePoint CSOM从QuickLaunch中删除所有节点:
public static void ClearQuickLaunch(string url, ICredentials credentials)
{
using (var context = new ClientContext(url))
{
context.Credentials = credentials;
NavigationNodeCollection qlNodes = context.Web.Navigation.QuickLaunch;
context.Load(qlNodes);
context.ExecuteQuery();
qlNodes.ToList().ForEach(node => node.DeleteObject());
context.ExecuteQuery();
}
}https://stackoverflow.com/questions/19803682
复制相似问题