In WSS 3.0, I've got an edit form which includes an
AttachmentsField control. It corresponds to the list of existing attachments, with delete links. In a normal edit form, if you delete an attachment and hit Save, it'll then remove the attachment.
I want to replicate this functionality for something similar, but I'm unsure how to extract the current list of attachments stored in the control. I need to do this in order to reflect any changes based on that.
Value property of the
AttachmentsField is apparently null, whether or not there are any attachments and whether or not I've made any changes on the control. If I check
AttachmentsField.Controls and recursively loop through it, there's a
Literal in it with an ID of
AttachmentsList, but I'm not sure how to extract the data from it (it errors if I try to print its
Text property). I can't find any other avenues of entry to try and access the data.
How do I extract the list of attachments currently rendered in the AttachmentsField control?