AddNow Method

The AddNow method of the SPAttachmentCollection class adds the attachment represented by the specified file name and byte array to the list item without requiring an update to the parent list item.

Parameters

leafName   A string that specifies the name of the file to attach.

data   A byte array that contains the the file to attach.

Return Value

A string that contains the URL of the attachment.

Remarks

Adding an attachment with this method takes effect immediately and does not require updating the list item in order to refresh version information.

Requirements

Platforms: Microsoft Windows Server 2003

Security: Code Access Security