R – Storing Feature Configuration within Sharepoint

sharepoint

i have a Sharepoint feature that essentially extends Lists with a new feature, using a List receiver. For each list the feature is attached to, i need to store some configuration.

Now, the first thing that came into my mind is the obvious solution: Have a global list. That works of course, but I wonder if there is some way to store feature-specific configuration in a hidden place? Not that it's sensitive information, but I don't want to clutter the Users Display with too many lists. I believe I can hide lists, but at the same time I wonder if sharepoint allows me to use it's database?

I am not talking about just using ADO.net to access the db directly (which is a big no-no with Sharepoint), I am thinking about some officially supported mechanism.

Best Answer

SPLists, unlike som other objects, do not have property bags, however all lists in a SharePoint site has a correlating SPFolder object stored in the RootFolder, and an SPFolder object has a property bag where you can store custom configuration data for the list.

Edit: I've written an article that shows how to use SPFolder to store custom list data if you are interested.

.b