Re: CuteWebUI.AttachmentItemCollection does not give me access to AttachmentItem

  •  09-26-2012, 11:25 AM

    Re: CuteWebUI.AttachmentItemCollection does not give me access to AttachmentItem

    Hi,

     

    Please try the example below. It shows you how to get the upload files info after uploaded.

     

    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 uploader1_UploadCompleted(object sender, UploaderEventArgs[] args)  
    8.     {  
    9.         btnSubmit.Visible = true;  
    10.     }  
    11.   
    12.     protected void btnSubmit_Click(object sender, EventArgs e)  
    13.     {  
    14.         for (int i = 0; i < uploader1.Items.Count; i++)  
    15.         {  
    16.             label1.Text += uploader1.Items[i].FileName;  
    17.             label1.Text += "<br/>";  
    18.         }  
    19.     }  
    20. </script>  
    21.   
    22. <html xmlns="http://www.w3.org/1999/xhtml">  
    23. <head runat="server">  
    24.     <title>example</title>  
    25. </head>  
    26. <body>  
    27.     <form id="form1" runat="server">  
    28.         <CuteWebUI:UploadAttachments ID="uploader1" runat="server" OnUploadCompleted="uploader1_UploadCompleted">  
    29.         </CuteWebUI:UploadAttachments>  
    30.         <asp:Button ID="btnSubmit" runat="server" Text="Get upload file info" Visible="false" OnClick="btnSubmit_Click" />  
    31.         <br />  
    32.         <asp:Label ID="label1" runat="server"></asp:Label>  
    33.     </form>  
    34. </body>  
    35. </html>  
     

    Regards,

     

    Ken 

View Complete Thread