Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Mar 2006
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Listing all folders in the server

    Hi!

    The user has to upload a file on to the websever. I want to display all the folders that exist in the server, so that he can select a specific folder to save the file. I am using Asp.net & C#. I need the code either in javascript/asp/asp.net code or some lang. which can be called using asp.net.

    Thank you

  • #2
    Senior Coder
    Join Date
    Dec 2002
    Location
    Arlington, Texas USA
    Posts
    1,072
    Thanks
    4
    Thanked 8 Times in 8 Posts
    do a google search on asp's file system object. This will do exactly what you want

  • #3
    New to the CF scene
    Join Date
    Mar 2006
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Actually i need that in either javascript/Asp.Net

  • #4
    Senior Coder
    Join Date
    Dec 2002
    Location
    Arlington, Texas USA
    Posts
    1,072
    Thanks
    4
    Thanked 8 Times in 8 Posts
    Without seeming like a B**** if you wanted a .Net answer did you post in the .Net forum?

    Client side Javascript is just that CLIENT SIDE in other words you cannot read whats on the server with client side script. You can read what's on the client with it but that is all.

    However, to do this in asp.net you need to use 2 classes, one for directories and one for files. To access directory information, use either the Directory class or the DirectoryInfo class; to access file information, use either the File class or the FileInfo class.

    you can find an example here http://www.upyourasp.net/articles/article.aspx?aid=5


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •