PersonalizationScope.User in Shared view(without using "Personalize this page" option)


  • Hi All,

    I have a custom property in custom webpart that having Personalizable set to PersonalizationScope.User, given below. I want that each user should have their own copy of this property. I am having a confusion with this property. Is this property work only when user will take Personal view using "Personalize this page" option? I want this property to work in shared view (when "Personalize this page" option is not taken).

            [Category("Extended Settings"),
            WebDisplayName("Sample Text"),
            WebDescription("Please Enter a Sample Color")]
            public string _SampleText



    Regards Amit

    Monday, October 08, 2012 4:51 AM

All replies

  • This is not going to be possible out of the box.

    One way to achieve this would be to implement it by creating a custom table in some database which could contain columns like webpartid, siteid, userid, propertyname, propertyvalue. In the setter section of your property, save the value in a table along with the current user id and in the getter section, read the corresponding value back for the current user id.

    Please "Mark as Answer" if a post has answered your question or "Vote as Helpful" if it was helpful in some way. Here's why

    Monday, October 08, 2012 5:01 AM
  • Hi Nauzad,

    Thanks for reply.

    Having a custom list or table in database is also a option however firstly i am trying to explore this option to be implemented out of the box.

    Regards Amit

    Monday, October 08, 2012 5:32 AM