-
StackOverflow 文档
-
sharepoint 教程
-
使用受管服务器端对象模型(完全信任)
-
使用分页检索项目
using (SPSite site = new SPSite("http://server/sites/siteCollection"))
using (SPWeb web = site.OpenWeb())
{
SPList list = web.Lists["Some list"];
SPQuery query = new SPQuery()
{
RowLimit = 100
};
do
{
SPListItemCollection items = list.GetItems(query);
foreach (SPListItem item in items)
{
// Do some operation with item
}
// Assign current position to SPQuery object
query.ListItemCollectionPosition = items.ListItemCollectionPosition;
} while (query.ListItemCollectionPosition != null);
}