Tags

,

The code below is to use the global navigation bar and Inherit site master page from parent of this site

                projectDetailWeb.Navigation.UseShared = true;

                //set masterpage to Inherit site master page from parent of this site
                projectDetailWeb.MasterUrl = projectDetailWeb.ParentWeb.MasterUrl;
                projectDetailWeb.AllProperties["__InheritsMasterUrl"] = "True";

                projectDetailWeb.CustomMasterUrl = projectDetailWeb.ParentWeb.CustomMasterUrl;
                projectDetailWeb.AllProperties["__InheritsCustomMasterUrl"] = "True";

                projectDetailWeb.AlternateCssUrl = projectDetailWeb.ParentWeb.AlternateCssUrl;

                projectDetailWeb.AllProperties["__InheritsAlternateCssUrl"] = "True";

                projectDetailWeb.Update();
Advertisements