Re: Failed to load resource: the server responded with a status of 500(Internal Server error)

  •  07-24-2012, 1:58 PM

    Re: Failed to load resource: the server responded with a status of 500(Internal Server error)

    Hi ssjganesh,
     
    How about the new example below? Does it save the upload file correct?
     
    1. <%@ Page Language="C#" %>  
    2.   
    3. <%@ Register TagPrefix="CuteWebUI" Namespace="CuteWebUI" Assembly="CuteWebUI.AjaxUploader" %>  
    4. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">  
    5. <html xmlns="http://www.w3.org/1999/xhtml">  
    6. <head id="Head1" runat="server">  
    7. </head>  
    8.   
    9. <script runat="server">  
    10.     
    11.     protected void uploader1_FileUploaded(object sender, UploaderEventArgs args)  
    12.     {  
    13.         args.CopyTo("~/images/"+args.FileName);  
    14.     }  
    15. </script>  
    16.   
    17. <body>  
    18.     <form id="Form1" runat="server">  
    19.         <CuteWebUI:UploadAttachments ID="uploader1" runat="server" OnFileUploaded="uploader1_FileUploaded">  
    20.         </CuteWebUI:UploadAttachments>  
    21.     </form>  
    22. </body>  
    23. </html>  
    After uploaded, you can get the uploader control attachment files count by the code below
     
    uploader1.Items.Count
     
    Regards,
     
    Ken 
View Complete Thread