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..
Thanks
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;
}
else
{
strPath = fld.Self.Path;
lstboxFile.Items.Add(strPath);
//strPath = "albums\\MSN Home Page";
lstboxFile.Items.Add(strPath);
BaydonConstants.hif1.Add(strPath);
dlgResult = "Ok";//DialogResult.OK;
}
}
-----------------
Looks like the problem you are facing is due to security permissions in that folder, please do check on IIS folder permissions as well as the user running under IIS has enough access to that folder.
Merry Xmas
In what kind of environment are you using this? You can't use the shell classes in ASP.NET.
I am using it in a web application which have to run on LAN.
Hi,
Based on my understanding, you want to upload the whole folder and need to show the Directory OpenDialoge. If I have misunderstood you, please feel free to let me know.
As far as I know, you can't achieve this by using the codes above but it can be implemented by ActiveX which is unusual approach we use.
Instead of it, usually we useZip the files ormutiple filesupload to achieve it. There are two links as followings about uploading mutiple files.
http://www.codeproject.com/KB/aspnet/multiuploads.aspx
http://www.codeproject.com/aspnet/FlashUpload.asp
Or you can try thisscript about upload folder:http://scriptbuilders.net/files/uploadfolderaction1.0.html
Hope it helps.
0 comments:
Post a Comment