Quantcast
Channel: SharePoint 2010 - Development and Programming forum
Viewing all articles
Browse latest Browse all 11571

fetch Current Navigation

$
0
0

Hi,

i need to fetch current navigation. below is my code.

 SPNavigationNodeCollection nodeColl = web.Navigation.QuickLaunch;



                        foreach (SPNavigationNode node in nodeColl)
                        {
                            //node.IsVisible = false;


                            litSitesName.Text += "<li><a href=\"" + SPEncode.HtmlEncode(node.Url) + "\">" + SPEncode.HtmlEncode(node.Title)+ "</a></li>";


                        }

and the result of this code snippet. the image is showing all subsites, pages, and navigation. even i have removed all subsites and pages from navigation and added my own links. but its not rendering exact result.

and i want to display these links instead of above links.



BestRegards|SharePoint Techies


Viewing all articles
Browse latest Browse all 11571

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>