Re: Reset Files Uploaded Grid

  •  12-12-2011, 2:48 AM

    Re: Reset Files Uploaded Grid

    Hi mremigio,
     
    If you mean clean the uploader attachment, please try the example below.
     
    <%@ 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">
    <script runat="server">
       
        protected void btn_Clean_Click(object sender, EventArgs e)
        {
            for (int i = uploader1.Items.Count - 1; i >= 0; i--)
            {
                uploader1.Items[i].Remove();
            }
        }
    </script>
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head id="Head1" runat="server">
        <title>example</title>
    </head>
    <body>
        <form id="form1" runat="server">
            <CuteWebUI:UploadAttachments ID="uploader1" runat="server">
            </CuteWebUI:UploadAttachments>
            <asp:Button ID="btn_Clean" runat="server" Text="Clean" OnClick="btn_Clean_Click" />
        </form>
    </body>
    </html>
     
    Regards,
     
    Ken 
View Complete Thread