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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Web Development
  3. ASP.NET
  4. file upload

file upload

Scheduled Pinned Locked Moved ASP.NET
8 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.
  • A Offline
    A Offline
    abu sundus
    wrote on last edited by
    #1

    i need to know how we can save the files that is loaded using the file upload control

    P B S 3 Replies Last reply
    0
    • A abu sundus

      i need to know how we can save the files that is loaded using the file upload control

      P Offline
      P Offline
      pmarfleet
      wrote on last edited by
      #2

      Use the SaveAs method exposed by the control.

      Paul Marfleet

      A 1 Reply Last reply
      0
      • P pmarfleet

        Use the SaveAs method exposed by the control.

        Paul Marfleet

        A Offline
        A Offline
        abu sundus
        wrote on last edited by
        #3

        no i mean that i write a web page this page contain as upload control i need som ideas that enable me to save the uploaded file from the other peoples on the internet into the server hard disk

        P 1 Reply Last reply
        0
        • A abu sundus

          no i mean that i write a web page this page contain as upload control i need som ideas that enable me to save the uploaded file from the other peoples on the internet into the server hard disk

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

          I'm afraid I don't understand your question. What do you mean by 'other peoples'? If you have a page that includes the ASP.NET FileUpload control, the user has to select a file. When the page is posted back to the server, you can programmatically work with the contents of the posted file. If your question relates to some other mechanism of file upload, please be more specific about what you want to do.

          Paul Marfleet

          A 1 Reply Last reply
          0
          • P pmarfleet

            I'm afraid I don't understand your question. What do you mean by 'other peoples'? If you have a page that includes the ASP.NET FileUpload control, the user has to select a file. When the page is posted back to the server, you can programmatically work with the contents of the posted file. If your question relates to some other mechanism of file upload, please be more specific about what you want to do.

            Paul Marfleet

            A Offline
            A Offline
            abu sundus
            wrote on last edited by
            #5

            sorry for my bad language, yes what i want is to programmatically work with the contents of the posted file . i try to upload some files from my website but when i check the server i didnot find the uploaded file so i assume that the control didnot work i read from the internet that i need to applay some code when the page is submited to make the file upload control work many thanks

            P 1 Reply Last reply
            0
            • A abu sundus

              sorry for my bad language, yes what i want is to programmatically work with the contents of the posted file . i try to upload some files from my website but when i check the server i didnot find the uploaded file so i assume that the control didnot work i read from the internet that i need to applay some code when the page is submited to make the file upload control work many thanks

              P Offline
              P Offline
              pmarfleet
              wrote on last edited by
              #6

              You should post the code you have written so far and identify the section you are experiencing difficulties with. The exact nature of your problem still isn't clear to me. The FileUpload control provides a means of acquiring a file from a client machine and including its contents in a HTTP server request. What happens to the contents of that file when the server receives the request is entirely up to the discretion of the programmer. As I have already stated, if you want to save the contents of the posted file on the server-side you need to call the SaveAs method of the FileUpload control.

              Paul Marfleet

              1 Reply Last reply
              0
              • A abu sundus

                i need to know how we can save the files that is loaded using the file upload control

                B Offline
                B Offline
                Bino B
                wrote on last edited by
                #7

                What u can do is use the SaveAs method to save the file to ur db as byte[] or just the filepath+filename.

                Cheers Bino www.codepal.co.nr

                1 Reply Last reply
                0
                • A abu sundus

                  i need to know how we can save the files that is loaded using the file upload control

                  S Offline
                  S Offline
                  Shujaat Ullah Khan
                  wrote on last edited by
                  #8

                  drag n drop html browse control on your page rght click on it and check the "Run as Server Control" option now drag and drop a button on your form. Lets say the name(ID) of your File control is File1 then on click event of your button write following code string path=@"C:\Uploaded";//Path where you want to save the uploaded file File1.PostedFile.SaveAs(path); You need to give ASPNET account write permissions on that folder where you want to save the file.

                  Shujaat

                  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