Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. How to handle file upload exception

How to handle file upload exception

Scheduled Pinned Locked Moved ASP.NET
questionhelptutorial
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Aslesh
    wrote on last edited by
    #1

    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

    A 1 Reply Last reply
    0
    • A Aslesh

      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

      A Offline
      A Offline
      Adam Maras
      wrote on last edited by
      #2

      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.

      A 1 Reply Last reply
      0
      • A Adam Maras

        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.

        A Offline
        A Offline
        Aslesh
        wrote on last edited by
        #3

        thats what my question is .. its not even triggering the upload event .. its directly displaying error... if it triggers the upload button event i can check and do as u said ...

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups