WS.Lists lst = new WS.Lists();
lst.Credentials = new NetworkCredential("userName", "Password","domain");
lst.Url = @"SiteURL/_vti_bin/Lists.asmx";
XmlDocument doc = new XmlDocument();
XmlElement element = doc.CreateElement("Batch");
string item = "<Method ID='1' Cmd='New'>" +
"<Field Name='Title'>mritunjay</Field>" +
"<Field Name='Area'>" + getID(lst, "11", "Area") + "</Field>" +
"<Field Name='Gasket'>None</Field>" +
"</Method>";
element.InnerXml = item;
lst.UpdateListItems("ListName", element);
No comments:
Post a Comment