Using "EditModePanel" To Show/Hide Webparts In Edit/Display Mode in Sharepoint 2007/2010
While working on Sharepoint 2007/2010 custom page layouts, you may need to control when some components are rendered based on the page mode; edit or display. This article is talking about this showing the most appropriate steps to achieve the result you wish in both Sharepoint 2007 and 2010 as they differ regarding this matter.