featureLayer.AddAttachment(theNewObjectID, stream, ofdWorksheet.File.Name, null, null);
I would also like to implement: AttachmentResult and Exception .
var callback = (Action<AttachmentResult>)delegate(AttachmentResult result) { MessageBox.Show("Added attachment to " + result.ObjectID); }; var errorCallback = (Action<Exception>)delegate(Exception result) { MessageBox.Show("Error adding attachment : " + result.Message); }; featureLayer.AddAttachment(theNewObjectID, stream, ofdWorksheet.File.Name, callback, errorCallback);
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.