Personalization of Page and Webpart

Discussion in 'ASP .Net' started by Bei, Apr 5, 2007.

  1. Bei

    Bei Guest

    Now I'm facing a requirement that every users can personalize their
    own web parts, and there is a administrator who has rights
    1, to publish a 'personalization' of a single web part to all users in
    his group.
    2, to a 'personalization' of a whole page.

    my solution to the first problem is: Add a new class inherits the
    webpart class and implements the IPersonalizable Interface and write
    code below to personlize:
    void IPersonalizable.Load(PersonalizationDictionary state)
    {

    PersonalizationEntry entry1 = state["someKey"] as
    PersonalizationEntry;
    if (entry1 != null)
    someValue = (someType)entry1 .Value;
    PersonalizationEntry entry2 = state["someOtherKey"] as
    PersonalizationEntry;
    if (entry2 != null)
    someOtherValue = (someOtherType)entry2 .Value;
    }

    void IPersonalizable.Save(PersonalizationDictionary state)
    {
    PersonalizationEntry entry1= new
    PersonalizationEntry(someValue,
    PersonalizationScope.Shared);
    state.Add("someKey", entry1);
    PersonalizationEntry entry2= new
    PersonalizationEntry(someOtherValue,
    PersonalizationScope.User);
    state.Add("someOtherKey", entry2);
    }

    When loading with the Webpartmange.Personalization.Scope==User, the
    entry1 with the scope 'shared' are always null, while the entry2 with
    'User' scope are not null. Can any one give me a detail explanation??


    I have no idea about publishing the personalization of the who page,
    especially how to <b>customizing</b> this.

    any helps are appreciated!
     
    Bei, Apr 5, 2007
    #1
    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. =?Utf-8?B?Y3RhZGxvY2s=?=

    WebPart Portal Personalization?

    =?Utf-8?B?Y3RhZGxvY2s=?=, Mar 24, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    622
    =?Utf-8?B?Y3RhZGxvY2s=?=
    Mar 24, 2005
  2. Leroy
    Replies:
    1
    Views:
    1,892
    Daniel TIZON
    Dec 16, 2005
  3. Electrified Research
    Replies:
    3
    Views:
    572
    Electrified Research
    Sep 23, 2006
  4. =?Utf-8?B?U2hhbg==?=

    Personalization webpart

    =?Utf-8?B?U2hhbg==?=, May 18, 2007, in forum: ASP .Net
    Replies:
    0
    Views:
    349
    =?Utf-8?B?U2hhbg==?=
    May 18, 2007
  5. Shan

    Webpart Personalization by Group of user

    Shan, May 16, 2007, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    141
Loading...

Share This Page