"attach" a file from code

Last post 07-29-2008, 1:11 AM by cutechat. 1 replies.
Sort Posts: Previous Next
  •  07-24-2008, 9:51 AM 42505

    "attach" a file from code

    I am creating a web mail interface for my users to send emails. I would like to be able to reload their attachments (files are stored in the DB) back into the upload control.
     
    Is there a way to do that and if so how? And if not, would it be possible to have this ability in the next (or soon thereafter) release?
     
    THANKS!

    Regards,

    Moe
  •  07-29-2008, 1:11 AM 42598 in reply to 42505

    Re: "attach" a file from code

    Hi,
     
     
    Please check the samples.
     
    In the advanced samples , it has a forum sample.
     
    It allow the user create a topic, and edit a topic.
     
    The sample is very close to your request.
     
    So please check the EditTopic.aspx
     
     
    You need create an IAttachmentProvider ,
     
    Set the attachmentcontrol.CustomProvider to your custom provider class
     
    and then use attachmentcontrol.AddCustomAttachment to insert the existing items.
     
     
    Regards , Terry .
View as RSS news feed in XML