Solved

how to get folder path in asp.net

Posted on 2008-10-17
1
888 Views
Last Modified: 2010-08-05
Hi,


I want to dispaly folder strucute in asp.net list control. For this i want to diplay the existing folders in the list box.
exmaple: If folder is "GROUP" located on the web server. i want to dispaly tree structure of "GROUP" strating with "GROUP and subfolders in "GROUP" etc.

Can you please suggerest how can i acheive this.

Thanks.
Ram,
0
Comment
Question by:ram27
1 Comment
 
LVL 13

Accepted Solution

by:
TechTiger007 earned 250 total points
ID: 22744964
You can use

System.IO.Directory.GetDirectories(<Path>) - get list of directories inside a directory, and sub directories
System.IO.Directory.GetFiles(<path>) - get list of files inside a file

after getting this list you can construct the tree structure in your code

0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

If I have to fix slow responding website my first thoughts are server side optimizations: the database may not be optimized or caching is not enabled, or things like that. We often overlook another major part of our web application: the client. We o…
What is Node.js? Node.js is a server side scripting language much like PHP or ASP but is used to implement the complete package of HTTP webserver and application framework. The difference is that Node.js’s execution engine is asynchronous and event…
Learn how to set-up custom confirmation messages to users who complete your Wufoo form. Include inputs from fields in your form, webpage redirects, and more with Wufoo’s confirmation options.
Learn how to set-up PayPal payment integration in your Wufoo form. Allow your users to remit payment through PayPal upon completion of your online form. This is helpful for collecting membership payments, customer payments, donations, and more.

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now