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