Directory Tree Browser
(Page 1 of 3 )
This article covers creating a directory tree browser using a combination of Javascript and ASP.NET. Download the code!From time to time as a developer you may be required the need to list the contents of a folder. While creating a list from a single folder isn't too complex, things can go south rather quickly when we are asked to create a listing that contains multiple sub-folders. Using a combination of ASP.NET and client-side Javascript we can create a simple directory listing that does not require any round trip visits to the server to display a collapsible tree. One item to point out is the client-side Javascript shown in this example only works with Internet Explorer. While this can be accomplished with cross-browser scripting, the Netscape/Mozilla compatible code I leave up to you to do. What we are hoping to have working after we are finished with this code sample is something similar to the image below. Additionally, you will be able to pass the URL path that is set in the value of the radio buttons along in a form.
Next: Getting Started >>
More ASP.NET Code Articles
More By Andrew_Putnam