SPNavigationNode.IsVisible property not working as expected.
        Posted  
        
            by Manish
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Manish
        
        
        
        Published on 2010-04-12T18:09:14Z
        Indexed on 
            2010/04/12
            18:13 UTC
        
        
        Read the original article
        Hit count: 962
        
My code is as under:
                using (SPSite spSiteTest = new SPSite(serverUrl))
                {
                    using (SPWeb mySite = spSiteTest.OpenWeb())
                {
                    SPNavigationNodeCollection quickLaunchNodes = mySite.Navigation.QuickLaunch;
                    SPNavigationNode navQuickNode = new SPNavigationNode("Title", "www.stackoverflow.com", true);
                    foreach (SPNavigationNode node in quickLaunchNodes)
                    {
                        if (node.Title == navQuickNode.Title)
                        {
                            node.Url = navQuickNode.Url;
                            node.IsVisible = isVisible;
                            node.Update();
                            //mySite.Update();
                            return;
                        }
                    }   
                    quickLaunchNodes.AddAsFirst(navQuickNode);
                }
            }
I want to hide a quick launch node but using the above code, it's not working. :(
Am I missing something?
© Stack Overflow or respective owner