Re: ClientSize MaxSizeKB Validation

  •  11-02-2012, 7:51 AM

    Re: ClientSize MaxSizeKB Validation

    Hi harikesani,

     

    1. If you want to valid the upload file size at client side, please try aip " CuteWebUI_AjaxUploader_OnSelect".

     

    1. <script>  
    2.     function CuteWebUI_AjaxUploader_OnSelect(files) {  
    3.   
    4.         for (var i = 0; i < files.length; i++) {  
    5.             if (files[i].FileSize > 2000000)  
    6.                 alert("file to large!");  
    7.             files[i].Cancel();  
    8.   
    9.         }  
    10.     }  
    11. </script>  
     

    2.  The multiple partial requests function is the silverlight plug-in function, if you do not need it, please disable the silverlight upload mode, like below. uploader1 is the upload control id.

     

    1. protected override void OnLoad(EventArgs e)  
    2.  {  
    3.      uploader1.SetAdvancedOption(UploaderAdvancedOption.NoSilverlight, "true");  
    4.      base.OnLoad(e);  
    5.  }  
     

    Regards,

     

    Ken 

View Complete Thread