Declarative Web Part Personalization

Discussion in 'ASP .Net' started by MULTISY, Jan 29, 2007.

  1. MULTISY

    MULTISY Guest

    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...
     
    MULTISY, Jan 29, 2007
    #1
    1. Advertising

  2. MULTISY

    MULTISY Guest

    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>


    "MULTISY" <> wrote in message
    news:ek0%23VC%...
    > 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...
    >
     
    MULTISY, Jan 29, 2007
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Michael
    Replies:
    0
    Views:
    397
    Michael
    Dec 9, 2005
  2. Anonieko
    Replies:
    0
    Views:
    4,843
    Anonieko
    Feb 8, 2006
  3. Electrified Research
    Replies:
    3
    Views:
    572
    Electrified Research
    Sep 23, 2006
  4. Holysmoke

    Problem with web part personalization

    Holysmoke, Sep 15, 2009, in forum: ASP .Net
    Replies:
    0
    Views:
    300
    Holysmoke
    Sep 15, 2009
  5. pca
    Replies:
    0
    Views:
    265
Loading...

Share This Page