Re: CuteWebUI_AjaxUploader_OnError Doesn't Fire

  •  02-22-2011, 10:14 PM

    Re: CuteWebUI_AjaxUploader_OnError Doesn't Fire

    Hi,
     
    Please test the example below. Upload a file large than 10 kb.
     
    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. <html xmlns="http://www.w3.org/1999/xhtml">  
    6. <head runat="server">  
    7.     <title>Untitled Page</title>  
    8. </head>  
    9. <body>  
    10.     <form id="form1" runat="server">  
    11.         <div>  
    12.             <CuteWebUI:UploadAttachments ID="uploader1" runat="server">  
    13.                 <ValidateOption MaxSizeKB="10" />  
    14.             </CuteWebUI:UploadAttachments>  
    15.         </div>  
    16.     </form>  
    17. </body>  
    18. </html>  
    19.   
    20. <script>  
    21.    function CuteWebUI_AjaxUploader_OnError(msg)  
    22.   
    23.     {  
    24.           if(msg.indexOf("The maximum file size allowed is set to")!=-1)  
    25.         {  
    26.             alert("This is a customized information");  
    27.             return false;  
    28.         }  
    29.     }  
    30. </script> 
    Regards,
     
    ken
View Complete Thread