我正在尝试更新/编辑Sharepoint 2007上已上传文档的属性。
我的代码:
参考链接:链接。
出现错误:“一个或多个字段类型未正确安装。请转到列表设置页面删除这些字段”。
我的代码:
Lists listService = new Lists();
listService.PreAuthenticate = true;
listService.Credentials = new NetworkCredential(username,password);
listService.Url = "http://myserver/SiteName/_vti_bin/lists.asmx";
string strBatch =
"<Method ID='1' Cmd='Update'> "
+ " <Field Name='ID'>3</Field> "
+ " <Field Name='Name'>Preeti</Field> "
+ " </Method> ";
XmlDocument xmlDoc = new System.Xml.XmlDocument();
System.Xml.XmlElement elBatch = xmlDoc.CreateElement("Batch");
elBatch.SetAttribute("OnError", "Continue");
elBatch.SetAttributeNode("UserName", "Preeti");
elBatch.InnerXml = strBatch;
XmlNode ndReturn = listService.UpdateListItems(ListName, elBatch);
MessageBox.Show(ndReturn.OuterXml);
参考链接:链接。
出现错误:“一个或多个字段类型未正确安装。请转到列表设置页面删除这些字段”。