SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

With this attributes decorating the Properties of a Web Part...

[Category("Common Settings")]
[WebDisplayName("Show tab header")]
[WebDescription("Show tab header for the News Feed webpart")]

... is the [WebPartStorage(Storage.Shared)] implied when using the above attributes (PersonalizationScope.Shared), or are the value stored for each user if Storage.Shared is not explicitly set.

share|improve this question
up vote 5 down vote accepted

PersonalizationScope.Shared indicates that the property is not personalizable. PersonalizationScope.User indicates that the property is personalizable.

Also, from the documentation for WebPartStorage: If you are developing SharePoint 2003 Web parts, you can apply both the PersonalizableAttribute attribute and the WebPartStorageAttribute attribute to change the serialization method. However, for later versions of SharePoint, the PersonalizableAttribute attribute is the default option used to deserialize the web part before using the WebPartStorageAttribute attribute.

share|improve this answer
To clarify: In Sharepoint 2010. Do we need to add [WebPartStorage(Storage.Shared)] to store the value only once? If we skip it will the value be stored seperatly for each user? – HaavardMeling May 10 '11 at 12:15
+1, and I'd like to add: actually, webparts were born in SharePoint 2003, and in 2005 they were moved into ASP.Net framework 2.0. From that time, System.Web.UI.WebControls.WebParts is more preferrable to use, and Microsoft.SharePoint.WebPartPages is usually not recommended (for example, see remarks section of this MSDN article:… article) – Andrey Markeev May 10 '11 at 12:23
In SharePoint 2010 you do not need to use the WebPartStorage attribute. SharePoint can get all the information it needs from the Personalizable attribute. When using the Personalizable attribute, you should pass PersonalizationScope.Shared to the constructor to prevent personalization (i.e. values being stored for each user). – Rob Windsor May 10 '11 at 12:26

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.