SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In my SharePoint 2010 solution I am creating Top Link Navigation programmatically ( on feature activation). Now on other feature activation I am adding a subsite to my site. I want my sub site to inherit the parent site's TLN. But I didn't find any parameter for this in the following method e.g. parent.Webs.Add(siteURL, siteTitle, "", Convert.ToUInt32(LOCALE_ID_ENGLISH), siteTemplate, false, false);

How can I inherit Top Link Navigation in my sub site?

share|improve this question
up vote 2 down vote accepted

You can inherit the navigation via:

SPWeb web = parent.Web.Add(/*params....*/);
web.Navigation.UseShared = true;

Use it just after you have created the site.

More Information: MSDN

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.