How to update Properties of Uploaded Documents on Sharepoint using Web Services ? : c#
- by Preeti
Hi,
I am trying to Update/Edit Properties of Uploaded Document on Sharepoint 2007.
My code:
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);
Refering Link.
Getting Error: "One or more field types are not installed properly. Go to the list settings page to delete these fields".
Regards,
Preeti