SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

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

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.

share|improve this question
up vote 6 down vote accepted

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!";
share|improve this answer
+1 for the value :) – Steve B Apr 23 '12 at 8:15
Agreed. I lol'd. – RJ Cuthbertson Apr 23 '12 at 22:01
Is it possible to have property bags at scopes other than Web? – Daryl Apr 24 '12 at 3:01
@Daryl property bags also for list like so _list.RootFolder.Properties["name"] = "value"; – Vishal_Sharepoint Aug 17 '12 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 -

share|improve this answer

This is very informative Link

share|improve this answer
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 '12 at 7:46

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.