I am looking for a control or a sample project to browse files and folders of a defined folder recursively with asp.net using treeview.
I dont know if there is such as a free control/sample project like this?
Thanks in advance.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
See my article – Build a File tree explorer with asp.net and jquery. The original jquery file is no longer available at the source i specified in the article. However i have the jquery file and can make it available.
Edit: I will post code in a bit.
Code is below:
First you’ll need server code to access the file system. This is can go inside a code behind file or in the aspx page itself – just delete everything else.
Next you’ll need a page to show the file tree. This page needs to reference the jquery core file and the jquery file tree script. I happen to have a reference to the jquery core file in my master page.
In the page that shows the file tree, stick this code. Root is the directory to browse, filetree.aspx has the serve code above. The div becomes the file tree. For the demo i use an iframe to act as the file viewer.