After getting SPLimitedWebPartManager instance through SPWeb.GetLimitedWebPartManager(), how can we get the ZoneId array of that WebPart page?
It seems we cannot get the ZoneIds directly, although we can see it in watch window during debugging. It is in SPLimitedWebPartManager.WebPartManager.WebPartZoneIds. However "WebPartManager" is not public variable.
Below is the screen shot of that WebPart page:
So we can easily guess out the ZoneId of each WebPart zone.
public const string Zone_TitleBar = @"TitleBar";
public const string Zone_Header = @"Header";
public const string Zone_LeftColumn = @"LeftColumn";
public const string Zone_MiddleColumn = @"MiddleColumn";
public const string Zone_RightColumn = @"RightColumn";
public const string Zone_Footer = @"Footer";
Now, at least we know what we should do if we want to add a WebPart into the "Left Column" zone.
spLimitedWebPartManager.AddWebPart(objListViewWebPart, Zone_LeftColumn, 1);