Solved

how to get folder path in asp.net

Posted on 2008-10-17
1
887 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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

A publishing tool, a Version Control System, or a Collaboration Platform! These can be some of the defining words for the two very famous web-hosting Git repositories: Bitbucket and Github. Git is widely used amongst the programmers and developers f…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Use Wufoo, an online form creation tool, to make powerful forms. Learn how to choose which pages of your form are visible to your users based on their inputs. The page rules feature provides you with an opportunity to create if:then statements for y…
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.

706 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

15 Experts available now in Live!

Get 1:1 Help Now