Declarative Web Part Personalization

M

MULTISY

Here is the situation, the WebPartManager exists on the masterpage, and the
web part is being declared in the contentplaceholder on the aspx page like
so:
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1"
runat="server">
<myWP:nowNeedPersonalization runat="server" ID="help" />
</asp:Content>

Now this web part need additional properties added and persisted for the
shared view of users, but when using SetPersonalizationDirty() fails since
this web part is not contained within the WebPartManger (is equal to null).
Is there a way to bind a declarative web part to the WebPartManager from
within the aspx page?

Help...
 
M

MULTISY

Happy ending:

To get web part into the WebPartManager requires these additions, now custom
properties will persist.

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1"
runat="server">
<asp:WebPartZone ID="WebPartZone1" runat="server">
<ZoneTemplate>
<myWP:nowNeedPersonalization runat="server" ID="help" />
</ZoneTemplate>
</asp:WebPartZone>
</asp:Content>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top