How do I get a closed web part back?

Last post 07-20-2005 5:31 PM by JoeBerg. 2 replies.

Sort Posts:

  • How do I get a closed web part back?

    07-20-2005, 12:29 PM
    • Participant
      1,256 point Participant
    • gknierim
    • Member since 04-14-2003, 9:06 AM
    • Merritt Island, FL
    • Posts 316

    I created a simple web part and closed it.  I restarted my project and now my page is blank.  How can I reset the web part so that it shows up again?

    Thanks,
    Greg

    "Providing software solutions for your world!"
    Excellent .NET Hosting here!
  • Re: How do I get a closed web part back?

    07-20-2005, 3:43 PM
    • Contributor
      6,299 point Contributor
    • BrockAllen
    • Member since 05-05-2003, 2:46 PM
    • Providence, RI
    • Posts 1,255
    You will need to add a CatalogZone control with a PageCatalogPart. To display the CatalogZone you will need to set the DisplayMode propery of the WebPartManager to WebPartManager.CatalogDisplayMode (in a button click event handler, for example). To then switch back to normal, set the DisplayMode back to WebPartManager.BrowseDisplayMode.

    -Brock
    DevelopMentor
    http://staff.develop.com/ballen
  • Re: How do I get a closed web part back?

    07-20-2005, 5:31 PM
    • Participant
      880 point Participant
    • JoeBerg
    • Member since 08-20-2004, 9:08 AM
    • Redmond
    • Posts 176

    For static web parts, you can also reset the personalization state by calling: 
       WebPartManager1.Personalization.ResetPersonalizationState();
    This will deletes the modifications done by the current user to the WebPart page and reset the state of the page. Which means that closed static webpart will be brought back.

Page 1 of 1 (3 items)