Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Listing files in ASP.NET

Options
  • 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: 8,950 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,689 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 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