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

Query String truncated from top navigation bar

$
0
0

I'm trying to update top navigation node URL while I'm creating site programmatically from custom template using below code, but for some reason querystring removed by sharepoint , however, SharePoint Server Publishing Infrastructure feature is enabled in site collection as well in custom site template SharePoint Server Publishing feature in enabled

SPWeb web = site.AllWebs[SiteName];

 web.AllowUnsafeUpdates = true;


 foreach (SPNavigationNode TopNode in web.Navigation.TopNavigationBar)
 {
   TopNode.Properties["UrlQueryString"] = "p=" + ProjectNo;
  TopNode.Update();
 }       
web.AllowUnsafeUpdates = false; 
thanks

Viewing all articles
Browse latest Browse all 11571

Trending Articles



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