Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Display file and folders from computer in treeview with checkbox

Display file and folders from computer in treeview with checkbox

Scheduled Pinned Locked Moved C#
csharpasp-netdata-structureshelp
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    kavitaBC
    wrote on last edited by
    #1

    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. :^)

    N T 2 Replies Last reply
    0
    • K kavitaBC

      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. :^)

      N Offline
      N Offline
      N a v a n e e t h
      wrote on last edited by
      #2

      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

      1 Reply Last reply
      0
      • K kavitaBC

        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. :^)

        T Offline
        T Offline
        Teuz
        wrote on last edited by
        #3

        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.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups