开发者

programatically add attachment in custom list in sharepoint 2010

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)
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜