Tag Archives: programming

SharePoing Global Navigation for SubSite not showing Parent Sites Nodes

Despite setting the properties “UseShared” for SPWeb object to “True”, it does not show the correct Parent’s Global Navigation nodes.

I have this requirement where the subsites (3rd level, where 1st level being the root web) in second level web (which is also inheriting from root web) needs to display the global navigation nodes.

After trying

mySubSite.Navigation.UseShared = true;

it does not show the actual parent’s global navigation, instead, it shows “[Portal Name]” which redirect to root web’s home page. If you go to “Site Settings” > “Navigation” and click “Save” button, it will subsequently show the correct nodes. Meaning, doing it in UI is fine but doing it programmatically is NOT OKAY!.

After digging into the Microsoft.SharePoint.Publishing.dll. I found this is the workaround.

 Microsoft.SharePoint.Publishing.Navigation.WebNavigationSettings settings = new Microsoft.SharePoint.Publishing.Navigation.WebNavigationSettings(web);
 settings.GlobalNavigation.Source = Microsoft.SharePoint.Publishing.Navigation.StandardNavigationSource.InheritFromParentWeb;

This will then make the subsite showing the correct one.

Compilation Error CS1061 ‘x.dll’ does not contain a definition for ‘Web’

Faced this problem when trying to run my web application. No error thrown in the Design view and no warning generated. However, hitting F5 gives me this error message which really cracked my head.

CS1061: ‘Telerik.Web.UI.RadComboBox’ does not contain a definition for ‘Web’ and no extension method ‘Web’ accepting a first argument of type ‘Telerik.Web.UI.RadComboBox’ could be found (are you missing a using directive or an assembly reference?)

Looking into the Error highlighted in the screenshot does not help at all. “Web” is not mentioned or used anywhere in my ASPX page.

Googling around and don’t seem to be able to find any solution. Thought it would be good to share the resolution i found after few hours!


The solution is plain SIMPLE! Which is to Remove Attribute “Height” away. Holy Cow.

It seem that Telerik RadTextBox does not support “Height” attribute. Instead, you should use Rows or Cols….


Found the source of problem is that i added a RadComboBox with ID=”System“. This is a system reserved keyword. After renaming it to other name. The error is now gone. Height and Width is now working as it is!