directory browsing

Discussion in 'ASP .Net' started by Katrina, Dec 1, 2003.

  1. Katrina

    Katrina Guest

    I am trying to create a Web application that can upload
    files to a server. I am running into some difficulty, I
    was wondering if someone could help me:

    1. Is there any easy way in ASP.NET to open a dialog
    similar to the OpenFileDialog, where the user could
    select a file on their machine?

    2. Since ASP.NET is server-side, how would I access the
    user's directory structure? If I use the IO namespace,
    won't I still retrieve only the data on my own system?

    Thx in advance.

    Katrina, Dec 1, 2003
    1. Advertisements

  2. To allow the user to select a file, you can use the file upload control on
    your toolbar, or type it into the HTML manually.
    <input type=file id=myFile runat=server />
    Here's a couple good tutorials on the subject for you:

    However, to directly access the directory structure on the client, you'll
    need .NET code running on the client with the appropriate permissions to do
    Steve C. Orr [MVP, MCSD], Dec 1, 2003
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.