directory browsing

  • Thread starter Thread starter Katrina
  • Start date Start date
K

Katrina

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
 
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:
http://www.aspnetpro.com/features/2003/07/asp200307so_f/asp200307so_f.asp
http://aspalliance.com/das/tutorial/fileupload.aspx

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
so.
 
Back
Top