1 回答

TA貢獻1784條經驗 獲得超7個贊
您提供的用于更新列表項的代碼適用于SharePoint 2010. 對于較新的版本嘗試
ListItem oListItem = oList.GetItemById(3);
// Starting with ClientContext, the constructor requires a URL to the
// server running SharePoint.
ClientContext context = new ClientContext("http://SiteUrl");
// Assume that the web has a list named "Announcements".
List announcementsList = context.Web.Lists.GetByTitle("Announcements");
// Assume there is a list item with ID=1.
ListItem listItem = announcementsList.GetItemById(1);
// Write a new value to the Body field of the Announcement item.
listItem["Body"] = "This is my new value!!";
listItem.Update();
context.ExecuteQuery();
- 1 回答
- 0 關注
- 181 瀏覽
添加回答
舉報