Hello,
Can someone suggest a way of finding an item in a list and updating that item to a different value.
I have tried using UpdateListItems but have not been successful.
Example: ListName is LIST
Column is credit
I want to find testCredit in Column credit and change its value.
Here's my code:
Thanks!
Can someone suggest a way of finding an item in a list and updating that item to a different value.
I have tried using UpdateListItems but have not been successful.
Example: ListName is LIST
Column is credit
I want to find testCredit in Column credit and change its value.
Here's my code:
Code:
XmlDocument xmlDoc = new System.Xml.XmlDocument();
System.Xml.XmlElement batchElement = xmlDoc.CreateElement("Batch");
batchElement.SetAttribute("OnError", "Continue");
batchElement.InnerXml = "<Method ID='1' Cmd='Update'>" +
"<Field Name ='ID'>credit</Field>" +
"<Field Name ='testCredit'>NEWVALUE</Field></Method>";
l.UpdateListItems("LIST", batchElement);
Thanks!