Folder browser in ASP.NET - code not working

M

MurugesanP

I am trying to browse folders through the following piece of code.
Please let me know if there is any kind of setting to get this working.

I want this to appear at the client side, but it should display the server
folder and folder should be created in server.(Uploaded this code in windows
2003 server).

using shell32.dll;
Shell32.ShellClass shl = new Shell32.ShellClass();
Shell32.Folder2 fld = (Shell32.Folder2)shl.BrowseForFolder(0, "Show Folder",
0, System.Reflection.Missing.Value);
txtFolderName.Text = fld.Self.Path ;

Thanks in advance.
Regards,
P.Murugesan.
 
C

Ciaran O''Donnell

That isnt really going to work. The client machine wont/shouldnt have access
to the web servers file system. Plus this code would have to run in
javascript in the browser and i'm not sure you can write code with does this
in javascript as the sandboxing would not allow you to have that level of
access to the client machine to make dialog boxs or browse the disk.
A file explorer on the web is notoriously hard to do and hasnt inst very
common. I dont know of any control vendors who make it so you would need to
code it all yourself.
 

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. After that, you can post your question and our members will help you out.

Ask a Question

Top