Wednesday, April 10, 2013

Update links to Top Navigation Sharepoint 2010 programmatically

Update links to Top Navigation Sharepoint 2010 programmatically

using (SPSite siteSuzuki = new SPSite("http://yourwebapp/sites/Suzuki"))
                {
                    SPWeb objWeb = siteSuzuki.OpenWeb();
                    SPNavigation _navigation = objWeb.Navigation;
                    SPNavigationNodeCollection _navNodes = _navigation.TopNavigationBar;

                    foreach (SPNavigationNode item in _navNodes)
                    {
                        if (item.Title == txtOldGlobalNavigationName.Text)
                        {
                            item.Title = txtNewGlobalNavigation.Text;
                            item.Update();
                        }
                    }
                    objWeb.Update();
                    //litError.Text += " Site URL: " + site.Url + ">> Site Name: " + site.OpenWeb().Title; ;
                }

7 comments:

  1. Nice information, I had come to know about your internet site from my friend, and let me tell you, your website gives the best and the most interesting information. Regards, SharePoint 2013 Administration Training in Hyderabad

    ReplyDelete
  2. Excellent information, I have been looking for this info. Thank you very much for posting it.
    SharePoint 2013 Developer Training in Hyderabad

    ReplyDelete
  3. Great article ...Thanks for your great information, the contents are quiet interesting. I will be waiting for your next post.
    SharePoint 2013 Online Training in Hyderabad

    ReplyDelete
  4. nice piece of information, I had come to know about your internet site from my friend vinay, delhi,i have read atleast 12 posts of yours by now, and let me tell you, your website gives the best and the most interesting information. This is just the kind of information that i had been looking for, i'm already your rss reader now and i would regularly watch out for the new post, once again hats off to you! Thanx a ton once again, Regards, obiee training in hyderabad

    ReplyDelete
  5. This article is really fantastic and thanks for sharing the valuable post.
    Sharepoint Online Training | Dynamics AX Online Training

    ReplyDelete