Re: Execute function when upload is complete.

  •  05-21-2009, 10:38 PM

    Re: Execute function when upload is complete.

    Hi,
     
    Because too many customers require this feature,
     
    So we have add a new event 'UploadCompleted' for it ,
     
    Please download it again and check this sample :
     
    1. <%@ Page Language="C#" %>  
    2.   
    3. <%@ Register TagPrefix="CuteWebUI" Namespace="CuteWebUI" Assembly="CuteWebUI.AjaxUploader, Version=3.0.0.0, Culture=neutral, PublicKeyToken=bc00d4b0e43ec38d" %>  
    4. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">  
    5.   
    6. <script runat="server">  
    7.   
    8.     protected void Uploader1_UploadCompleted(object sender, UploaderEventArgs[] args)   
    9.     {   
    10.         string msg = "You have uploaded " + args.Length + " files";   
    11.   
    12.         foreach (UploaderEventArgs arg in args)   
    13.         {   
    14.             msg += "\r\n" + arg.FileName + "," + arg.FileSize;   
    15.         }   
    16.   
    17.         Label1.Text = msg;   
    18.     }   
    19. </script>  
    20.   
    21. <html xmlns="http://www.w3.org/1999/xhtml">  
    22. <head runat="server">  
    23.     <title>UploadCompleted sample</title>  
    24. </head>  
    25. <body>  
    26.     <form id="form1" runat="server">  
    27.         <div>  
    28.             <CuteWebUI:Uploader runat="server" ID="Uploader1" MultipleFilesUpload="True" OnUploadCompleted="Uploader1_UploadCompleted">  
    29.             </CuteWebUI:Uploader>  
    30.             <pre><asp:Label runat="server" ID="Label1" />  
    31.             </pre>  
    32.         </div>  
    33.     </form>  
    34. </body>  
    35. </html>  
     
    Regards,
    Terry
     
View Complete Thread