4

Can we set NavigationNode objects properties through Client Object Model [C#]?

Below is the server side code of what I want to achieve through Client Object Model:

var newNode = new SPNavigationNode("My Link", "pages/myPage.aspx");
newNode = web.Navigation.QuickLaunch.AddAsFirst(newNode);
newNode.Properties.Add("NodeType", "AuthoredLinkPlain");
newNode.Properties.Add("UrlQueryString", "key=abc");
newNode.Update();

1 Answer 1

1

With CSOM same can be coded like below code snippet.

            NavigationNodeCreationInformation node = new NavigationNodeCreationInformation();
            node.Title = "My Node";
            node.Url = "pages/default.aspx";
            NavigationNode quickLauchNode = clientContext.Web.Navigation.QuickLaunch.Add(node);
            quickLauchNode.Update();
            clientContext.ExecuteQuery();
2
  • No it doesn't help, setting the NavigationNode properties is what I'm looking for. Something like NavigationNode.Properties["UrlQueryString"]="k=abc"; Commented Jun 4, 2015 at 10:24
  • 2
    This is not possible with CSOM.
    – Symbol
    Commented Jun 5, 2015 at 11:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.