Posted on: 5/16/2012 10:18:03 AM | Views : 203

I am using the following code for validatiog the image size bit not workin,please help
aspx code:
<script type="text/javascript">
     function CheckImgSize(source, args) {
         
         if (FileUpload1.PostedFile.ContentLength >= 40960) {
             args.IsValid = false;
         }
         else {
             args.IsValid = true;
         }
     }
</script> 


and aspx.cs code :
protected void validateMaximumFileSize(object source, ServerValidateEventArgs args)
   {
   & ...

Go to the complete details ...