Jeff Julian's Blog

Founder of Geekswithblogs.net


News

GWB Tag













My Stats

  • Posts - 659
  • Comments - 807
  • Trackbacks - 2808

Twitter












Tag Cloud


Recent Comments


Recent Posts


Archives


Post Categories


Image Galleries


My Company


My Fav. Sites



SharePoint-Logo 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.


posted @ Wednesday, June 09, 2010 6:54 AM |

Comments

No comments posted yet.
Post A Comment
Title:
Name:
Email:
Website:
Comment:
Verification: