What is the best practice to save/retrieve site specific (SPWeb) data in SharePoint 2010?

StackOverflow https://stackoverflow.com/questions/19391500

Вопрос

I would like to manipulate certain data objects bound to SPWeb in my SharePoint 2010 Farm.

For instance, I am building an application page accessible from a site's settings page that would give the ability to specify a point of contact for a site. I would like to store the SPUser object somehow on that site.

Is the List approach the best practice for such scenario? I don't actually want the data to be visible without using code-behind.

Thank you

Это было полезно?

Решение

You can definitely store the user in a list as Dennis mentioned.

Are you using Publishing Feature? If so then what I usually do in this situations is create a content type that extends Page and create an additional field called contact point type user. You then assign that content type to the homepage for that site.

The benefits of this, is that you can then allow site managers to maintain their own point of contacts, since you can do a page layout where that field is editable. It will crawled by search therefore you can refine searches based on point of contacts etc.

Другие советы

It depends on your design, but absolutely you can store the user in a list that your page references.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top