tags:

views:

55

answers:

2

I need to give the administrators of a SharePoint site the ability to edit a property in the site.

This property will be an email address. So the admins can change the email address to whatever they want.

My code will need to access this property somehow.

How should I go about this? Is there somwhere at the site collection level where I can create/store a property like this which can then be accessed in code?

+2  A: 

My recommendation is to create a custom list in the root site that stores configuration items like this. Each list item reflects a different configuration item, such as e-mail address. Access to the list can be restricted to administrators using standard SharePoint security.

The advantage of this is that your code can be very simple. It would just access this list and read the item you need. There is no need to develop a UI or worry about who can change the value.

I use my own feature that creates this list and a simple supporting class to access the values. The list also contains a 'Category' column which I set to group by default. This simplifies the view when working with many items.

Alex Angas
+1  A: 

You can try out Property Bag of the SharePoint SPWeb refer this link for more information. But as stated by Alex you need to write your custom UI to update and fetch the Information by this method.

Kusek