views:

110

answers:

1

I have a website in Sharepoint.

As you know,in settings users can order the sites and pages as they want in exploration, and then you can get these items with this order with:

SPWeb web = CurrentSite.OpenWeb(currentSite);
 SPNavigation nav = web.Navigation;
 SPNavigationNodeCollection nodeColl = nav.QuickLaunch;

The problem I am having is that there is a cache for this, and everytime the user adds a webpage, the list i get with web.Navigation.QuickLaunch is the same as before.

The only way to delete the cache is to enter the exploration and change the order of the items and then restablish it and accept the form.

Can somebody tell me if i can do it in another way?

A: 

i'm not 100% sure, but trying retrieving a new copy of the SPWeb object instead of using one from the current context:

using ( SPSite l_site = new SPSite(SPContext.Current.Site.Url); )
{
  using ( SPWeb l_web = l_site.OpenWeb() )
  {
    ..
  }
}
Jason