Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

how to get folder path in asp.net

Posted on 2008-10-17
1
Medium Priority
?
897 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 1000 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 does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Developer tools in browsers have been around for a while, yet they are still heavily underused by developers. Developers still fix html or CSS then refresh page to see effect, or they put alert or debugger in JavaScript and then try again and again …
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
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…
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.

877 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