我在一个 web 部件中工作。我过滤(使用 caml)一个 SharePoint 列表并将我的结果放在一个List<SPListItem>
.
现在,我需要填充另一个 SharePoint 列表(我在相同的代码中创建了该列表),但我找不到这样做的方法。
List<SPListItem> results = new List<SPListItem>() //results have the result of my query
.
.
.
SPList listFiltered = mySite.Lists[newListName]; //listFiltered is my newlist
SPListItemCollection newListItems = listFiltered.Items; //newListItem are the item from my list
foreach (SPListItem item in results)
{
//I don't know how to send my result to my SharePoint list :(
}