Solved

how to get folder path in asp.net

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Introduction A frequently used term in Object-Oriented design is "SOLID" which is a mnemonic acronym that covers five principles of OO design.  These principles do not stand alone; there is interplay among them.  And they are not laws, merely princ…
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
Wufoo.com provides powerful tools for surveying targeted groups, and utilizing data from completed surveys to find trends, discover areas of demand or customer expectation, and make business decisions on products or services.
Use Wufoo, an online form creation tool, to make powerful forms. Learn how to selectively show certain fields based on user input using rules to gather relevant information and data from your forms. The rules feature provides you with an opportunity…

777 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