They show in elements.xml files sometimes. What do they consist of? What scope do they live on? (Farm, Site, Web, or something different?) How do they interact with the rest of Sharepoint? What are their most common usage scenarios? Anything special about them I should know about?

I think they are some sort of typed name-value collection, but I have no idea what uses them or why.

3 Answers 3


Property bag is a collection, intended to hold your application's configuration data. There is a collection present at each SharePoint site. So in each SPWeb Object, you can use the collection theSPWeb.AllProperties the same way you use a hash table. For example:

spWeb.AllProperties["newValue"] = "OH SharePoint, you so buggy!";
  • 2
    +1 for the value :)
    – Steve B
    Apr 23, 2012 at 8:15
  • Agreed. I lol'd. Apr 23, 2012 at 22:01
  • Is it possible to have property bags at scopes other than Web?
    – Daryl
    Apr 24, 2012 at 3:01
  • @Daryl property bags also for list like so _list.RootFolder.Properties["name"] = "value"; Aug 17, 2012 at 6:37

Property bags are powerful and good way to store properties and static details that is used in SharePoint. The Elements.xml file is used to define the property bag elements for the particular feature. Its something similar to entering key value pair configuration into your web.config file, for use within the application. Please find this detailed blog for more info.

There is a codeplex project which could give you an overview of how property bags can be used in SharePoint 2010 or 2007 - Property Bag Settings - http://pbs2010.codeplex.com/


This is very informative Link http://nitindeveloperspoint.blogspot.com.au/2012/07/store-custom-data-in-sharepoint.html

  • While this may theoretically answer the question, we prefer inclusion of the essential parts of the answer here, and to provide the link for reference. See answer for general guidelines.
    – SPDoctor
    Aug 17, 2012 at 7:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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