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. File upload problem

File upload problem

Scheduled Pinned Locked Moved ASP.NET
helpcsharpasp-netquestion
5 Posts 4 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.
  • P Offline
    P Offline
    prasobh
    wrote on last edited by
    #1

    Hi, I'am using ASP.NET 2 and I am trying to check size of an upload file.Since by default fileuploader can upload upto 4Mb if i try to upload a file greater than 4Mb shows a page that shows PAGE CANNOT BE DISPLAYED message without entering the upload function.How can i reload my default page without showing this error page if size is greatrer than 4Mb.i dont want to increase my upload size though..

    Prasobh

    R D S 3 Replies Last reply
    0
    • P prasobh

      Hi, I'am using ASP.NET 2 and I am trying to check size of an upload file.Since by default fileuploader can upload upto 4Mb if i try to upload a file greater than 4Mb shows a page that shows PAGE CANNOT BE DISPLAYED message without entering the upload function.How can i reload my default page without showing this error page if size is greatrer than 4Mb.i dont want to increase my upload size though..

      Prasobh

      R Offline
      R Offline
      r_bargav
      wrote on last edited by
      #2

      ] add this code in the web.config file

      1 Reply Last reply
      0
      • P prasobh

        Hi, I'am using ASP.NET 2 and I am trying to check size of an upload file.Since by default fileuploader can upload upto 4Mb if i try to upload a file greater than 4Mb shows a page that shows PAGE CANNOT BE DISPLAYED message without entering the upload function.How can i reload my default page without showing this error page if size is greatrer than 4Mb.i dont want to increase my upload size though..

        Prasobh

        D Offline
        D Offline
        dipak dipak
        wrote on last edited by
        #3

        Hello, Check the file length first. You may helped by the following code. (Refrence : using System.IO;) FileInfo FI = new FileInfo(@"C:\Rate.txt"); Response.Write("File Size : " + FI.Length.ToString()); This code returns the size of the particular file. You may check the file size u want. Reply. Best Of Luck. :-O

        Dipak

        P 1 Reply Last reply
        0
        • D dipak dipak

          Hello, Check the file length first. You may helped by the following code. (Refrence : using System.IO;) FileInfo FI = new FileInfo(@"C:\Rate.txt"); Response.Write("File Size : " + FI.Length.ToString()); This code returns the size of the particular file. You may check the file size u want. Reply. Best Of Luck. :-O

          Dipak

          P Offline
          P Offline
          prasobh
          wrote on last edited by
          #4

          Hi, but my function upload is not calling when i try to upload a file greater than 4Mb.didnt even go to page_load just go to PAGE CANNOT BE SHOWn message.. i dont want to increase the file size also... i need to reload my default page if some one try to upload a large file.. can i check file size at server side before actually begin to upload

          Prasobh

          1 Reply Last reply
          0
          • P prasobh

            Hi, I'am using ASP.NET 2 and I am trying to check size of an upload file.Since by default fileuploader can upload upto 4Mb if i try to upload a file greater than 4Mb shows a page that shows PAGE CANNOT BE DISPLAYED message without entering the upload function.How can i reload my default page without showing this error page if size is greatrer than 4Mb.i dont want to increase my upload size though..

            Prasobh

            S Offline
            S Offline
            sulabh2020
            wrote on last edited by
            #5

            Hi dear, For making upload more than 4MB you just need to alter ur webconfig file, becoz by default webconfig settings allows for 4MB data transmit. u can find the Code line for same thru google.

            Hello Forum Always be in touch to help about the topic ASP.NET

            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