tags:

views:

435

answers:

2

Hello,

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.

+3  A: 

Hello,

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

Bjørn Furuknap
Now THAT sounds interesting. I'm gonna experiment with that.
Michael Stum
+1  A: 

You should take a look at Sharepoint Config Store. It's made by Chris O'Brien.

With SPConfigStore you can retrieve config items this way

string sAdminEmail = ConfigStore.GetValue("MyApplication", "AdminEmail");
Pascal Paradis
Looks interesting, but essentially this is just a wrapper around a global List.
Michael Stum