Hi m60dx,
The example below shows you how to synchronize two uploader
- <%@ Page Language="C#" %>
-
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-
- <script runat="server">
- protected void uploader1_FileUploaded(object sender, UploaderEventArgs args)
- {
- using (Stream str = args.OpenStream())
- {
- uploader2.Items.Add(args.FileSize, args.FileName, str);
- }
-
- }
- protected void uploader1_AttachmentRemoveClicked(object sender, AttachmentItemEventArgs args)
- {
-
- for (int i = uploader2.Items.Count - 1; i >= 0; i--)
- {
- if (uploader2.Items[i].FileName == args.Item.FileName)
- {
- uploader2.Items[i].Remove();
- }
- }
- }
-
- </script>
-
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head runat="server">
- <title>Untitled Page</title>
- </head>
- <body>
- <form id="form1" runat="server">
- <div>
- <CuteWebUI:UploadAttachments ID="uploader1" runat="server" OnFileUploaded="uploader1_FileUploaded"
- OnAttachmentRemoveClicked="uploader1_AttachmentRemoveClicked">
- </CuteWebUI:UploadAttachments>
- <CuteWebUI:UploadAttachments ID="uploader2" runat="server">
- </CuteWebUI:UploadAttachments>
- </div>
- </form>
- </body>
- </html>
Regards,
ken