Quantcast
Channel: ASP.NET AJAX + Ajax Control Toolkit (ACT)
Viewing all articles
Browse latest Browse all 5678

AjaxFileUpload1.MaxFileSize

$
0
0

Hi

I am trying to limit the maximum file size a AjaxFileUpload control will allow.  (I am using Visual Studio 2017 RC and AJAC 16.1.1.0. with code behind in visual basic).

On page load I try to limit file size to 75000 using AjaxFileUpload1.MaxFileSize = 75000 but this does not appear to have any effect on the control as files larger than this are still uploaded to the server.

Within Sub UploadComplete, I can test the file size (e.filesize) and if greater than 75000, then do nothing (effectively stopping the file being uploaded to the server) or use the AjaxFileUpload1.SaveAs(serverPath + fileName).

Within Sub UploadCompleteAll, only files that have been uploaded to my directory on the server are processed.

How can I notify the user a file has NOT been uploaded?

Thanks for any help.


Viewing all articles
Browse latest Browse all 5678

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>