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

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • =?Utf-8?B?SmF5LXBt?=

    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.ShellCl ass shl = new Shell32.ShellCl ass();
    Shell32.Folder2 fld = (Shell32.Folder 2)shl.BrowseFor Folder(0, "Show Folder",
    0, System.Reflecti on.Missing.Valu e);
    txtFolderName.T ext = fld.Self.Path ;

    Thanks in advance.

    Regards,

    Jay

  • Marc Gravell

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

    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


    Comment

    Working...