Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Professional
ASP.NET 2.0 Professional If you are an experienced ASP.NET programmer, this is the forum for your 2.0 questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old December 17th, 2007, 08:40 AM
Authorized User
Join Date: Nov 2007
Posts: 33
Thanks: 0
Thanked 0 Times in 0 Posts
Default The main Issue on Browse folder in Web application

I want to phrase my problem in a new way that the following code works well on the same system on debugging mode of the project but If I want to copy the url of the project and paste into new browser window without debugging mode, then the problem arises that Its shows progressing the browse folder dialog box does not appears any how. So If any one have the solution of my problem please reply me soon....
I written earlier on this topic shown below...
I am facing a problem of browse folder. Its working fine on loacalhost but when I upload my project into my client's server, the browse folder dialog box does not appears any how. It giving no error but browser progress bar shows progressing....
Is the reason behind this is I have used Shell32.dll for browse folder.. Or there is another way of implementing browse folder functionality on my project..
following is mine code
Using shell32;
protected void AddFolder_Click(object sender, EventArgs e)
        string strPath = "";
        string strCaption = "Browse a directory for uploading Album.";
        //DialogResult dlgResult;
        string dlgResult = "";
        Shell32.ShellClass shl = new Shell32.ShellClass();
        Shell32.Folder2 fld = (Shell32.Folder2)shl.BrowseForFolder(0, strCaption, 0, System.Reflection.Missing.Value);
        if (fld == null)
            dlgResult = "Cancel";//DialogResult.Cancel;
        strPath = fld.Self.Path;
        //strPath = "albums\\MSN Home Page";
            dlgResult = "Ok";//DialogResult.OK;


Old December 18th, 2007, 12:33 AM
planoie's Avatar
Friend of Wrox
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts

I think you are missing one of the fundamental concepts of web based applications: separation of server and client. You can not write server side script that creates windows user interface elements (i.e. a folder browser in this case). How would you expect this program to run for a user running a mac or linux? They certainly won't have the windows Shell32 class on their system.

HTML provides for a file upload input control in the basic HTML control set. At its simplest:
<input type="file" />

This gives you a text box with a "Browse" button next to it with which you can select a file from the local (i.e. client) file system.

It looks like you are trying to provide the user the ability to select a whole folder instead of an individual file. This will require some custom control that is downloaded into the browser. This can be done with ActiveX, java and other technologies. (For example: youtube uses a flash uploader to provide upload progress which is functionality you don't get with the built in HTML file upload input control.)


Similar Threads
Thread Thread Starter Forum Replies Last Post
change permission of folder in web application SachinMalge ASP.NET 2.0 Basics 0 March 12th, 2007 09:31 AM
Need to open a browse folder x2pca Visual C++ 0 July 10th, 2006 02:27 PM
folder name issue Justine Classic ASP Professional 5 March 17th, 2004 12:34 PM
Setting up a folder as an application lorenzo Classic ASP Databases 1 February 17th, 2004 04:56 AM
Accesing Web Folder kosla78 Classic ASP Basics 4 December 4th, 2003 07:44 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.