I'm trying to add a link in the Quick Launch to a folder inside my "Sample Documents" library. Linking to the document library is fine using this code:
SPNavigationNode node = new SPNavigationNode("Sample Documents", "Lists/Sample Documents", false);
node = web.Navigation.QuickLaunch.AddAsLast(node);However, when I try to link to a folder "My Folder" inside the "Sample Documents" library, it gives me an exception that it cannot find that file or folder. I got the URL by observing the address when I try to view the folder using Windows Explorer (using Open with Explorer library functionality). My code looks like below:
SPNavigationNode node = new SPNavigationNode("My Folder", "Lists/Sample Documents/My Folder", false);
node = web.Navigation.QuickLaunch.AddAsLast(node);
What's the correct way to do it?