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. get full File path using Fileupload control

get full File path using Fileupload control

Scheduled Pinned Locked Moved ASP.NET
help
6 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.
  • B Offline
    B Offline
    Bharani_Ram
    wrote on last edited by
    #1

    iam unable to get full File path using Fileupload control i used, string str = Fileupload1.PostedFile.FileName; and also string str = Fileupload1.FileName; etc using this i can only get the filename, Please Help me

    Bharani

    G S 2 Replies Last reply
    0
    • B Bharani_Ram

      iam unable to get full File path using Fileupload control i used, string str = Fileupload1.PostedFile.FileName; and also string str = Fileupload1.FileName; etc using this i can only get the filename, Please Help me

      Bharani

      G Offline
      G Offline
      Gayani Devapriya
      wrote on last edited by
      #2

      Hi, Here is how you can upload a file using the FileUploader. string sImageToSavePath = @"c:\inetpub\wwwroot\MySample\img\bb.gif"; //Give a path and a file name byte[] ba = FileUpload1.FileBytes; File.WriteAllBytes(sImageToSavePath,ba); Hope this helps Thx, Gayani

      B 1 Reply Last reply
      0
      • G Gayani Devapriya

        Hi, Here is how you can upload a file using the FileUploader. string sImageToSavePath = @"c:\inetpub\wwwroot\MySample\img\bb.gif"; //Give a path and a file name byte[] ba = FileUpload1.FileBytes; File.WriteAllBytes(sImageToSavePath,ba); Hope this helps Thx, Gayani

        B Offline
        B Offline
        Bharani_Ram
        wrote on last edited by
        #3

        we are giving the path by our self. c:\inetpub\wwwroot\MySample\img\bb.gif but i need the path what the clients will open to upload the file using fileupload control ex: in my system i use to open the file which is at D:\\Bharani\\Folder1\\...file.xml other can open in his own path i need to track that user selected path is it possible.

        Bharani

        S 1 Reply Last reply
        0
        • B Bharani_Ram

          we are giving the path by our self. c:\inetpub\wwwroot\MySample\img\bb.gif but i need the path what the clients will open to upload the file using fileupload control ex: in my system i use to open the file which is at D:\\Bharani\\Folder1\\...file.xml other can open in his own path i need to track that user selected path is it possible.

          Bharani

          S Offline
          S Offline
          Sherin Iranimose
          wrote on last edited by
          #4

          You can get the full path using javascript. document.getElementById('FileUpload1').value so store it in a hidden field for later use.

          EVEN THE WORD IMPOSSIBLE SAYS I M POSSIBLE.

          B 1 Reply Last reply
          0
          • B Bharani_Ram

            iam unable to get full File path using Fileupload control i used, string str = Fileupload1.PostedFile.FileName; and also string str = Fileupload1.FileName; etc using this i can only get the filename, Please Help me

            Bharani

            S Offline
            S Offline
            Sutheesh chandran
            wrote on last edited by
            #5

            Hi barani, Try this string fextn = System.IO.Path.GetFullPath(File1.PostedFile.FileName);

            Sutheesh Ramachandran Cybernet Software Systems, T Nagar, Chennai 17.

            1 Reply Last reply
            0
            • S Sherin Iranimose

              You can get the full path using javascript. document.getElementById('FileUpload1').value so store it in a hidden field for later use.

              EVEN THE WORD IMPOSSIBLE SAYS I M POSSIBLE.

              B Offline
              B Offline
              Bharani_Ram
              wrote on last edited by
              #6

              Thanks for ur Help i got the full path from hidden filed and using javascript Thanks allot for all.

              Bharani

              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