Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

Listing files in ASP.NET

  • 26-04-2005 11:48AM
    #1
    Closed Accounts Posts: 1,156 ✭✭✭


    Hi folks, Im trying to come up with a way of listing all the files in a folder on the Client machine and displaying them in an "Open File" control(what used to be an MDI control in VB6. The user could then select one and pass the name back to the server.

    Can anyone tell me if this is possible and point me to a sample somewhere?

    Thanks a mil !


Comments

  • Moderators, Science, Health & Environment Moderators Posts: 9,207 Mod ✭✭✭✭mewso


    If this is ASP.NET then I don't think it's possible or wise to do it. Having said that there may be third party windows based control but they would require the user to allow them to be installed. You would not be able to do it with a web control as it falls under the limitations of any html web page.


  • Closed Accounts Posts: 1,156 ✭✭✭DaBreno


    musician wrote:
    If this is ASP.NET then I don't think it's possible or wise to do it. Having said that there may be third party windows based control but they would require the user to allow them to be installed. You would not be able to do it with a web control as it falls under the limitations of any html web page.

    Crap! That sends me back to the drawing board.
    Cheers.


  • Moderators, Society & Culture Moderators Posts: 9,688 Mod ✭✭✭✭stevenmu


    You could take a look at this CodeProject Article on how to upload files with ASP.Net, it's done using C# but the VB.Net code should be easy to figure out from it.


  • Registered Users, Registered Users 2 Posts: 604 ✭✭✭Kai


    DaBreno wrote:
    Hi folks, Im trying to come up with a way of listing all the files in a folder on the Client machine and displaying them in an "Open File" control(what used to be an MDI control in VB6. The user could then select one and pass the name back to the server.

    Can anyone tell me if this is possible and point me to a sample somewhere?

    Thanks a mil !


    Hang on.

    You want to use a Open file dialog box ?

    Use
    <Input ID="MyFile" Type="File" RunAt="Server" Size="40">
    

    Which will give you a text box with a button. You can then pass the filename back to the server or use it to upload a file. I wrote a Control to do this so if you want the code send me a PM.


Advertisement