473,386 Members | 1,962 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Folder browser in ASP.NET - code not working

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.

Jul 11 '08 #1
1 2269
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.

--
Ciaran O''Donnell
http://wannabedeveloper.spaces.live.com
"MurugesanP" wrote:
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.
Jul 11 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Kim Lots | last post by:
Hi Sorry to disturb you again but i really like to know what's the NTFS folder permissions on a "virtual directory" folder for a public webserver iis 5.x running ASP 3.0 with an Access DB on a...
3
by: R Reyes | last post by:
what are the pros/cons of uploading a file into a database (like access, sql server, oracle) vs. uploading a file into a folder (and only storing its path in a database table) ? i've never had...
6
by: Richard Hollenbeck | last post by:
I'd like a button on my main form to backup the database. How can I call up the Windows folder browser to prompt me for a filename and type (*.mdb) and folder to save in? I looked in my book and...
16
by: juli jul | last post by:
Hello ,I am working with ..Net Framework 1.1 - Version:1.1.4322 and Development Enviroment2003 - Version 7.1.3088. Is this version of .Net supposed to have a normal folder browser or might be...
9
by: Nick 'The Database Guy' | last post by:
Hi All, I want to browse to a particular folder, not a particular file. The reason for this is that I have a utility that asks people to browse to a certain file, and I want them to be able to...
4
by: Joey | last post by:
asp.net 2/C#/VS2005 I have a web app where I use a stream writer to create a CSV (text) file. I then use my code to save the file in the site's 'App_Data' folder, in a subfolder called 'Temp'....
6
by: kimiraikkonen | last post by:
Hello, I have a listbox and folder browser control. I need to display all .mp3 files' pathes into listbox. It was Ok with openfiledialog but how can list all .mp3 extension- having files into...
0
by: wademi | last post by:
Hi Guys. How do create a folder browser dialogue box in c#.net. I can drag the folder browser dialogue box in the window I am working in but I cant get it it to display and function on my form.
12
by: Reggie | last post by:
Hi And TIA. Running VS2005 and IIS7.0. I have a procedure that copies a file to a folder in my web application. When I run the project from VS it runs fine . I'm usin IE as default viewer. But...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.