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 to server hard disk in asp.net

File Upload to server hard disk in asp.net

Scheduled Pinned Locked Moved ASP.NET
csharpasp-netsysadmintutorial
3 Posts 3 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.
  • Y Offline
    Y Offline
    ysunil_74
    wrote on last edited by
    #1

    How to upload file in asp.net 2.0 to server hard disk from client side and down load file

    L J 2 Replies Last reply
    0
    • Y ysunil_74

      How to upload file in asp.net 2.0 to server hard disk from client side and down load file

      L Offline
      L Offline
      lastFarhi
      wrote on last edited by
      #2

      Drag nd Drop Html control input(file) nd in code behind write following code string fn = System.IO.Path.GetFileName(YourfileName.PostedFile.FileName); string SaveLocation = Server.MapPath("FolderName") + "\\" + fn; YourfileName.PostedFile.SaveAs(SaveLocation); Response.Write(fn + " Has been uploaded to " + SaveLocation); Instead of "YourfileName" use de id of input(file) control nd FolderName is de name of de folder on server in which to upload de file. i think it will solve ur problem.

      1 Reply Last reply
      0
      • Y ysunil_74

        How to upload file in asp.net 2.0 to server hard disk from client side and down load file

        J Offline
        J Offline
        Jaiprakash M Bankolli
        wrote on last edited by
        #3

        You can use the file upload component use the and use the .SaveAs(filename) method to save at the server side. Thanks,

        Regards, Jaiprakash M Bankolli jaiprakash.bankolli@gmail.com My Blog Suggestions for me

        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