1
ClientContext cl = new Microsoft.SharePoint.Client.ClientContext("http://" + "mysharepoint" + "/" + SubWeb);
System.Net.NetworkCredential cred = new System.Net.NetworkCredential("myuser", "mypass", "ntuni");
cl.Credentials = cred;
ListItemCollection result;
List qrtList = cl.Web.Lists.GetByTitle(QRT_LIST_NAME);
result = qrtList.GetItems(CamlQuery.CreateAllItemsQuery());
cl.Load(result);
cl.ExecuteQuery();
foreach (ListItem item in result)
{
if (item.FieldValues["UniqueId"].ToString() == QrtId)
{
item.FieldValues["R_x00e9_ponse"] = r.ResponseTxt;
item.Update();
qrtList.Update();
}
}
cl.ExecuteQuery();
我的對象沒有更新,一旦我出於某種原因訪問sharepoint。這是圍繞一個嘗試抓住,沒有被捕獲。 Halp?謝謝 !ClientContext對象沒有正確更新
ps:添加新項目工作正常。