Display file and folders from computer in treeview with checkbox
-
Hello, i am developing a ASP.NET C# 'BACKUP' application. so here i have to display file and folders of computer in tree view, so that user can selected which they want to create a back up. but i am begineer to this platform. also i have searched many code for this but i am not getting it. can any one provide me the code for this. please it is very help full to me. :^)
-
Hello, i am developing a ASP.NET C# 'BACKUP' application. so here i have to display file and folders of computer in tree view, so that user can selected which they want to create a back up. but i am begineer to this platform. also i have searched many code for this but i am not getting it. can any one provide me the code for this. please it is very help full to me. :^)
kavitaBC wrote:
so here i have to display file and folders of computer in tree view
Files and folders of server or the client machine? If it is server, use
Directory
class and work with the methods provided. If it is client machine, ASP.NET can't do that. BTW, this is C# forum, not ASP.NET.Navaneeth How to use google | Ask smart questions
-
Hello, i am developing a ASP.NET C# 'BACKUP' application. so here i have to display file and folders of computer in tree view, so that user can selected which they want to create a back up. but i am begineer to this platform. also i have searched many code for this but i am not getting it. can any one provide me the code for this. please it is very help full to me. :^)
You have to code a function that recursively scan a folder for files/folders and add it to the treeview. You can start with //this code shows a dialog to choose a folder FolderBrowserDialog FBD = new FolderBrowserDialog(); FBD.ShowDialog(); string path = FBD.SelectedPath; //with this you get files in the folder DirectoryInfo dirInfo = new DirectoryInfo(path); FileInfo[] filInfo; filInfo = dirInfo.GetFiles("*.*"); DirectoryInfo subDir = dirInfo.GetDirectory(); Or Something like this. Hope it helps.