SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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

I'm having some problems with placement of my web parts. I have two different CEWP, which should be placed with zone index 0 and 1. However, after deployment both have the index 0. This is how I set the index in code:

            using (SPWeb web = site.OpenWeb())
                SPLimitedWebPartManager webparts = web.GetLimitedWebPartManager(pageUrl, PersonalizationScope.Shared);
                var wp = new ContentEditorWebPart();
                wp.Hidden = false;
                wp.ContentLink = web.Site.ServerRelativeUrl + "SiteAssets/imageMap.html";
                wp.ChromeType = PartChromeType.None;
                webparts.AddWebPart(wp, "left", 1);

How can I make the zone index "stick"?

share|improve this question

Your Answer


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

Browse other questions tagged or ask your own question.