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. Control to pick up Folder Path in ASP .Net

Control to pick up Folder Path in ASP .Net

Scheduled Pinned Locked Moved ASP.NET
csharpasp-net
4 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.
  • C Offline
    C Offline
    chintan1979
    wrote on last edited by
    #1

    Hi, I want to give the user a control to pick up the folder path and as the user selects a folder, the same needs to be assign in one TextBox for saving purpose in my ASP.Net Page (Same like File Browser Control, Input type='file'...). But I am not able to do the same.

    M 1 Reply Last reply
    0
    • C chintan1979

      Hi, I want to give the user a control to pick up the folder path and as the user selects a folder, the same needs to be assign in one TextBox for saving purpose in my ASP.Net Page (Same like File Browser Control, Input type='file'...). But I am not able to do the same.

      M Offline
      M Offline
      Mike Ellison
      wrote on last edited by
      #2

      Hi there. If you do use <input type='file'...> you already have access to the full client file path through the HtmlInputFile.Value[^] property. Just add the id and runat='server' attributes so you can access the object server-side.

      C 1 Reply Last reply
      0
      • M Mike Ellison

        Hi there. If you do use <input type='file'...> you already have access to the full client file path through the HtmlInputFile.Value[^] property. Just add the id and runat='server' attributes so you can access the object server-side.

        C Offline
        C Offline
        chintan1979
        wrote on last edited by
        #3

        Hi, Thanks for the reply. I want to give the user a option to select a folder and not a file. Like for e.g. I want to ask user a path for saving temporary files. The control you are talking about is for selecting a file and not the folder. Thanks in advance !! Chintan

        M 1 Reply Last reply
        0
        • C chintan1979

          Hi, Thanks for the reply. I want to give the user a option to select a folder and not a file. Like for e.g. I want to ask user a path for saving temporary files. The control you are talking about is for selecting a file and not the folder. Thanks in advance !! Chintan

          M Offline
          M Offline
          Mike Ellison
          wrote on last edited by
          #4

          Hi there. I see - I misunderstood your original question. If you are looking to provide a way for users to select a server-based folder, I think a treeview control would work well. If you wish to allow a user to select a client-based folder - well, the closest thing in html is <input type='file'>. If you were developing an intranet application and had some control over the user environment (e.g. browser and security options), you might consider making use of an ActiveX componenet or Java applet. Here's an example that uses FileSystemObject (again, security issues and browser compatibility issues come into play with this approach): http://www.tek-tips.com/faqs.cfm?fid=5201[^]

          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