Re: Guidance needed - not sure which uploader type to use!

  •  12-19-2011, 6:24 AM

    Re: Guidance needed - not sure which uploader type to use!

    Hi Tawl,
     
    I suggest you use the UploadAttachments control, it allow to get all upload files back by porperty "Items".
     
    <%@ Page Language="C#" %>

    <%@ Register TagPrefix="CuteWebUI" Namespace="CuteWebUI" Assembly="CuteWebUI.AjaxUploader" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head id="Head1" runat="server">
        <title>example</title>
    </head>

    <script runat="server">
        protected void btn_GetFiles_Click(object sender, EventArgs e)
        {
            for (int i = 0; i < uploader1.Items.Count; i++)
            {
                uploader1.Items[i].CopyTo("~/photos/" + uploader1.Items[i].FileName);
            }
        }
    </script>

    <body>
        <form id="form1" runat="server">
            <CuteWebUI:UploadAttachments ID="uploader1" runat="server">
            </CuteWebUI:UploadAttachments>
            <asp:Button ID="btn_GetFiles" runat="server" Text="Get upload files" OnClick="btn_GetFiles_Click" />
        </form>
    </body>
    </html>
     
    Regards,
     
    Ken
View Complete Thread