Navigation node description programmatically
-
01-10-2020 - |
Question
How can we add navigation node description programmatically.
I have this code:
SPNavigationNode MyNav= new SPNavigationNode("Nav Text", "NavUrl", true);
MyNav.Update();
currentNav.AddAsLast(MyNav);
The arguments only set the Title and the URL, but how do we set the description when we hover over the node?
Solution
You can add tooltip using the Properties
HashTable.
So in your case it will be
MyNav.Properties["Description"] = "Nav Text";
MyNav.Update();
Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange