i have registered ItemAttachmentAdded in my custom lis开发者_运维问答t.can anyone send me some code how can i add attachment in custom list.
Google told me how to do it:
http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spattachmentcollection.add.aspx
byte[] fileData = GetFileData();
SPContext.Current.Web.Lists["My List"].Items[0].Attachments.Add("filename", fileData)
精彩评论