Hello
I have an file upload button on an aspx file. The file size limit, defined in Web.config is: 500Kb. When I deliberately go over that amount to test it, I get the following error:
System.Web.HttpException: Maximum request length exceeded.
Instead of sending the user to that page, how would I 'trap' his 'misdemeanour' and show an error message on the page?
This is what should show the error on screen in my aspx file:
File size limit: System.Web.HttpException
I have an file upload button on an aspx file. The file size limit, defined in Web.config is: 500Kb. When I deliberately go over that amount to test it, I get the following error:
System.Web.HttpException: Maximum request length exceeded.
Instead of sending the user to that page, how would I 'trap' his 'misdemeanour' and show an error message on the page?
This is what should show the error on screen in my aspx file:
Code:
<asp:labelid="messageArea"...