How to handle file upload exception
-
Hi, i set in the web.config file the user can upload upto 10mb file. but when i tried to test it with more than 10mb and press that upload button, it is not even going to that event and directly showing error in the browser. How can i handle this exception? Santhapur
-
Hi, i set in the web.config file the user can upload upto 10mb file. but when i tried to test it with more than 10mb and press that upload button, it is not even going to that event and directly showing error in the browser. How can i handle this exception? Santhapur
Instead of specifying the maximum filesize in Web.config, check the uploaded file length during your upload event. You can invalidate the control or display an error message if they exceed the maximum filesize.
-
Instead of specifying the maximum filesize in Web.config, check the uploaded file length during your upload event. You can invalidate the control or display an error message if they exceed the maximum filesize.