XmlNode return_node = listService.UpdateListItems(ListName, batchElement);
var id= return_node.SelectSingleNode("//@ows_ID").Value;
string srcUrl = "E:\\ASLog.txt";
FileStream fStream = File.OpenRead(srcUrl);
string fileName = fStream.Name.Substring(3);
byte[] contents = new byte[fStream.Length];
fStream.Read(contents, 0, (int)fStream.Length);
fStream.Close();
listService.AddAttachment(ListName, id, fileName, contents);
No comments:
Post a Comment