I'm working with sharepoint 2007 and i have a question, does a sharepoint library / list has something like property bag, where i could store some properties for the list? Like a SPWeb object. Or maybe not property bag, but something similar?

Or is there only SPWeb.Properties to store the properties?


No, as you can see from the msdn documentation, the SPList object does not have a "Property Bag" property.

That said, if you need to, a common workaround is using the property bag of the root folder of the list as a surrogate. You see... SPFolder does define a property bag. Also you can take for granted that a (normal) list or document library should have a root folder: that means that you can store the required properties on the folder (maybe use a custom key prefix to distinguish them from the other properties) and work your solution from here.

| improve this answer | |

How about using hidden columns in the list to store your information? Should be an easy implementation and quite easy to use aswell

| improve this answer | |

You can create an element manifest property bag for a file, folder, list item, or website.

For example:

<PropertyBag HyperlinkBaseUrl="http://contoso.com/sites/EastEnglandSalesOffice"" Url="Lists/CurrentDiscounts" ParentType="ListItem" ItemIndex="23"/>
    <Property Name="DaysToLive" Value="90" Type="int" />

Reference: http://msdn.microsoft.com/en-us/library/gg491705(v=office.14).aspx

| improve this answer | |

why don't you just use property bag of the root web?

To identify your keys just do a prefix of the property a name of your list or its guid or something similar. E.g. youlist_myproperty1, youlist_myproperty2 etc.

To get


or set properties

SPContext.Current.Site.RootWeb.Properties[key] = value

Hope this helps,


| improve this answer | |
  • nice to know that someone agrees -_- – BlueSoul Apr 2 '13 at 13:17

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.