Re: Clearing Ajax Uploader items

  •  06-27-2011, 9:05 PM

    Re: Clearing Ajax Uploader items

    Hi mchamo,
     
    Please try the example below
     
    1. <%@ Page Language="C#" %>  
    2.   
    3. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">  
    4.   
    5. <script runat="server">  
    6.   
    7.     protected void button1_Click(object sender, EventArgs e)  
    8.     {  
    9.         for (int i = Attachment1.Items.Count - 1; i >= 0; i--)  
    10.         {  
    11.             Attachment1.Items[i].Remove();  
    12.         }  
    13.     }  
    14. </script>  
    15.   
    16. <html xmlns="http://www.w3.org/1999/xhtml">  
    17. <head id="Head1" runat="server">  
    18.     <title>example</title>  
    19. </head>  
    20. <body>  
    21.     <form id="Form1" runat="server">  
    22.         <CuteWebUI:UploadAttachments ID="Attachment1" runat="server">  
    23.         </CuteWebUI:UploadAttachments>  
    24.         <asp:Button ID="button1" runat="server" Text="Clean items" OnClick="button1_Click" />  
    25.     </form>  
    26. </body>  
    27. </html> 
    Regards,
     
    ken
View Complete Thread