Stop reload of queue table after upload

Last post 03-02-2011, 3:19 PM by Eric. 3 replies.
Sort Posts: Previous Next
  •  02-25-2011, 9:27 PM 66458

    Stop reload of queue table after upload

    Hi,
     
    can you tell me if there's a way to stop the queue table being changed after upload has completed - ie, I would like to keep the first table visible and not second.
     
    Or if thats not possible, how I hide the 'Remove' column from the second table 
     
    Thanks,
    Damian
     
     
     
  •  02-28-2011, 8:58 PM 66486 in reply to 66458

    Re: Stop reload of queue table after upload

    Hi DamianHartin,
     
    Please use control Uploader and set MultipleFilesUpload to true. It should not show the attachment table.
     
        <CuteWebUI:Uploader ID="uploader1" runat="server" MultipleFilesUpload="true">
                </CuteWebUI:Uploader>
     
    Regards,
     
    ken
  •  03-01-2011, 6:27 PM 66500 in reply to 66486

    Re: Stop reload of queue table after upload

    Thanks,
     
    but now there's no table at all.
     
     I'm happy for the user to see the list of uploaded files once completed, but I don't want the 'Remove' link to be there.
     
    Is there any way I can edit / capture the returned data/table?
     
    Thanks,
    Damian
  •  03-02-2011, 3:19 PM 66515 in reply to 66500

    Re: Stop reload of queue table after upload

    Dear DamianHartin,
     
     1.  I'm happy for the user to see the list of uploaded files once completed, but I don't want the 'Remove' link to be there.
          Please set ShowRemoveButtons to false and try it again:
           <CuteWebUI:UploadAttachments InsertText="Upload Multiple files Now" runat="server"
                    ID="Attachments1" MultipleFilesUpload="true"
                    OnAttachmentAdded="Attachments1_AttachmentAdded" 
                    ShowRemoveButtons="False">
                </CuteWebUI:UploadAttachments>
    2.  Is there any way I can edit / capture the returned data/table?
     
     Please refer to the following highlighted code, you can run this snippet directly:
     
    <%@ 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">
        void InsertMsg(string msg)
        {
            ListBoxEvents.Items.Insert(0, msg);
            ListBoxEvents.SelectedIndex = 0;
        }

        void Attachments1_AttachmentAdded(object sender, AttachmentItemEventArgs args)
        {
            InsertMsg(args.Item.FileName + " has been uploaded.");
        }

        void ButtonDeleteAll_Click(object sender, EventArgs e)
        {
            InsertMsg("Attachments1.DeleteAllAttachments();");
            Attachments1.DeleteAllAttachments();
        }
        void ButtonTellme_Click(object sender, EventArgs e)
        {
            ListBoxEvents.Items.Clear();
            foreach (AttachmentItem item in Attachments1.Items)
            {
                InsertMsg(item.FileName + ", " + item.FileSize + " bytes.");
                //Copies the uploaded file to a new location.
                //item.CopyTo("c:\\temp\\"+item.FileName);
                //You can also open the uploaded file's data stream.
                //System.IO.Stream data = item.OpenStream();
            }
        }
    </script>

    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title>Uploading multiple files like GMail</title>
        <link rel="stylesheet" href="demo.css" type="text/css" />
    </head>
    <body>
        <form id="form1" runat="server">
            <div class="content">
                <h2>
                    Uploading multiple files like GMail</h2>
                <p>
                    Google's GMail has a nice way of allowing you to upload multiple files. Rather than
                    showing you 10 file upload boxes at once, the user attaches a file, you can click
                    a button to add another attachment.
                </p>
                <br />
                <CuteWebUI:UploadAttachments InsertText="Upload Multiple files Now" runat="server"
                    ID="Attachments1" MultipleFilesUpload="true" OnAttachmentAdded="Attachments1_AttachmentAdded">
                    <InsertButtonStyle />
                </CuteWebUI:UploadAttachments>
                <br />
                <br />
                <asp:Button ID="ButtonDeleteAll" runat="server" Text="Delete All" OnClick="ButtonDeleteAll_Click" />&nbsp;&nbsp;
                <asp:Button ID="ButtonTellme" runat="server" Text="Show Uploaded File Information"
                    OnClick="ButtonTellme_Click" />
                <br />
                <br />
                <div>
                    Server Trace:
                    <br />
                    <asp:ListBox runat="server" ID="ListBoxEvents" Width="400"></asp:ListBox>
                </div>
            </div>
        </form>
    </body>
    </html>
    Thank you for asking
     
View as RSS news feed in XML