I have added a list which can contain links on a MOSS portal. This list can contain folders. How do i add items to a folder using the webservice?
With the following i can add items to the root of the list:
string sBatch = string.Empty;
sBatch = "<Method ID=\"1\" Cmd=\"New\">";
sBatch += "<Field Name=\"ID\">New</Field>";
sBatch += string.Format("<Field Name=\"Title\"><![CDATA[{0}]]></Field>", item.Title);
sBatch += string.Format("<Field Name=\"URL\"><![CDATA[{0}]]></Field>", item.Url);
sBatch += string.Format("<Field Name=\"Comments\"><![CDATA[{0}]]></Field>", item.Comments);
System.Xml.XmlDocument xDoc = new System.Xml.XmlDocument();
System.Xml.XmlElement xBatch = xDoc.CreateElement("Batch");
xBatch.SetAttribute("OnError", "Return");
xBatch.InnerXml = sBatch;
What do i need to change/add to place a item in a (sub)folder?
Gerard