We've expanded our news coverage and improved our search! Visit news.oreilly.com for the latest or search for all things across O'Reilly!
advertisement

Article:
  Web Parts in ASP.NET 2.0
Subject:   webpart control
Date:   2006-11-27 01:21:46
From:   Prachi_Gurjar
How to retain the webpart control, once closed by mistake? (at runtime).
I am not able to view the webpart once i closed it on runtime.
Full Threads Oldest First

Showing messages 1 through 2 of 2.

  • webpart control
    2007-04-09 06:40:42  shhhh [Reply | View]

    hi write this code on ur webpart.aspx

    <asp:CatalogZone ID="CatalogZone1" runat="server">
    <ZoneTemplate>
    <asp:DeclarativeCatalogPart ID="DeclarativeCatalogPart1" runat="server">
    <WebPartsTemplate>
    <asp:button id=btnttms/>
    </WebPartsTemplate>
    </asp:DeclarativeCatalogPart>
    <asp:PageCatalogPart ID="PageCatalogPart1" runat="server" />
    </ZoneTemplate>
    </asp:CatalogZone>
  • Jesse Liberty photo webpart control
    2006-11-27 05:30:56  Jesse Liberty [Reply | View]

    To solve this, modify your Zone Template (where you currently have a DeclarativeCatalogPart, and add a PageCatalogPart (self-closing). This will modify your page, adding to the page catalog each web part that you close, allowing you to reopen it and assign it to any zone you choose, as shown here (http://www.jliberty.com/pages/WebPartsPageCatalogPart.htm)

    Thanks!

    -j

    -j