tree view

  • Thread starter Thread starter sonu
  • Start date Start date
S

sonu

I want to develop a application from where we can select files from a
tree view
Directly like window explor.

Please help me
 
sonu,

You can create your own tree view using the FileInfo and DirectoryInfo
class. They have methods, GetFiles and GetDirectories which will help you
get file and directory listings for a directory. You can then populate your
tree view when you need to (when you click on the node to open it).

Also, you could use a FileSystemWatcher to determine when the contents
of open nodes change (so that you can update your list accordingly).

Hope this helps.
 
Thisnks for information,

But i want to create file explorer so that we select the file from
client harddisk and upload that file in server.
 
Sonu,

Why don't you just use a file dialog then? I mean, you can select the
files you want from that, and then perform your operation.

You could also create a shell extension, which would allow you to add
items to the context menu for a file type, which would then call your
component when that item is picked.
 
Nicholas,

pleae give me link or any code related thingsfor the file dialog. i
want to create this functionality for web application.
 
sonu,

If you are doing this for a web application, just use the input element
with the type attribute set to "file". On the server side (your ASP.NET
page), you can access the files uploaded by the client through the Files
property exposed through the HttpRequest instance (which is exposed through
the Request property on your page).
 
Nicholas,

This is not specified how many files have to upload.
I want some think like file explore from where i can select the file
for upload.
 
sonu,

If you want to do something like this then, you will have to embed a
control in your web page and upload it yourself. A web page doesn't have
the permissions necessary to do this.
 
Back
Top