467,915 Members | 1,265 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,915 developers. It's quick & easy.

Help! Browse folder option in asp.net (C#) - The code does not wor

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
right?
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,

Jay

Jul 11 '08 #1
  • viewed: 1511
Share:
1 Reply
The C# side of ASP.NET runs at the server, but I'm guessing you want this to
appear at the client - in which case you need to limit yourself to [d]html
and javascript etc. Normally this means an <input type="file"/>. You can do
more, but it involves running something addition at the client - such as an
ActiveX control or Silverlight (which actually has pretty good support for
secure file browsing, from what I've seen...).

Marc
Jul 11 '08 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

10 posts views Thread by Jacek Generowicz | last post: by
9 posts views Thread by Tom | last post: by
reply views Thread by python-help-bounces | last post: by
4 posts views Thread by Sarir Khamsi | last post: by
2 posts views Thread by Sudheer Kareem | last post: by
reply views Thread by tbatwork828 | last post: by
3 posts views Thread by Colin J. Williams | last post: by
2 posts views Thread by John Baker | last post: by
9 posts views Thread by JJ | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.