| 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. |
||
Showing messages 1 through 3 of 3.
-
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>
-
webpart control
2006-11-27 05:30:56 JesseLiberty [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




PersonalizationAdministration.ResetAllState(PersonalizationScope.User);
By Executing Above Statment resets the particular user's settings.