MOSS 2007 – WCM Blank WebPart Page Zone ID’s
- by Jeff Julian
Here is the list of Zone ID’s for the Blank WebPart Page (BlankWebPartPage.aspx") that is part of the Publishing Portal with MOSS 2007: TitleBar Header TopLeftRow TopRightRow CenterLeftColumn CenterColumn CenterRightColumn Footer RightColumn I was in need of these and wasn’t able to find them with a simple search on Google so I wanted to share them with you. To get a list of WebPartZone objects for a page that a webpart lives on can be done with the following code: foreach (WebPartZone zone in this.WebPartManager.Zones) { this.Controls.Add(new LiteralControl(zone.ID + "<br />")); } Use this code in a webpart that inherits from Microsoft.SharePoint.WebPartPages.WebPart. This is a simple way to do the equivalent of a Response.Write while having the output in the webpart zone your part resides in. It also saves you from attaching to the process and debugging with the watch or quick watch. Technorati Tags: MOSS,WebParts,BlankWebPartPage.aspx,Zones