private void AddWebParts(ArrayList webParts, WebPartZoneBase zone) { // Add web parts from the list in reverse order, so they appear in the zone in the same // order they were returned from the catalog part. (VSWhidbey 77750) webParts.Reverse(); foreach (WebPart part in webParts) { WebPartZoneBase targetZone = zone; if (part.AllowZoneChange == false && part.Zone != null) { targetZone = part.Zone; } // WebPartManager is checked for null in AddWebParts() Debug.Assert(WebPartManager != null); // Add new parts to the top of the Zone, so the user will see them without scrolling the page WebPartManager.AddWebPart(part, targetZone, 0); } }
public void AddWebPart(WebPart webPart) { _manager.AddWebPart(webPart); }