title: File too big when uploading a file with the asp:FileUpLoad control
body: <p>I am using the <code>asp:FileUpLoad</code> to upload files in my <code>asp.net c#</code> project. This all works fine as long as the file size does not exceed the maximum allowed. When the maximum is exceeded. I get an error "<code>Internet Explorer cannot display the webpage</code>". The problem is the try catch block doesn't catch the error so I cannot give the <code>user a friendly message</code> that they have excced the allowable size. I have seen this problem while searching the web but I cannot find an acceptable solution. </p>
  
  <p>I would look at other controls, but my managemment probably wouldn't go for buying a third-party control.</p>
  
  <p>In light of answer suggesting ajac, I need to add this comment. I tried to load the ajax controls months ago. As soon as I use an ajax control, I get this compile error. </p>
  
  <blockquote>
    <p>Error 98  The type 'System.Web.UI.ScriptControl' is defined in an
    assembly that is not referenced. You must add a reference to assembly
    'System.Web.Extensions, Version=4.0.0.0, Culture=neutral,
    PublicKeyToken=31bf3856ad364e35'.</p>
  </blockquote>
  
  <p>I could get rid of it although I did add '<code>System.Web.Extensions</code>'. So I abandoned Ajax and used other techniques. </p>
  
  <p>So I need to solved this problem or a completely new solution. </p>