65.9K
CodeProject is changing. Read more.
Home

A Tree Control using ASP

starIconstarIcon
emptyStarIcon
starIcon
emptyStarIconemptyStarIcon

2.78/5 (8 votes)

May 16, 2000

viewsIcon

292867

downloadIcon

4040

A simple tree control written using ASP that allows you to display hierachical data.

  • Download source files - 16 Kb
  • Sample Image - TreeControl.jpg

    The project is a simple Tree Control created using ASP. This is first version that offers only display feature, but in the next version the user will be able to add, edit and delete nodes.

    The Tree Control structure is stored in an access database. The TreeContent table has following columns:

  • IDNode – number, is the node ID and it not be duplicated.
  • IDParentNode – number, is the ID parent node.
  • NodeCaption – string, node caption that will be displayed in the page.
  • NodeType – string, is type of node. Can be one from two valid values: F – folder, I – item. If it contains another value then the node will be folder (F).
  • NodeAction – string, is node action. Is available only for items node, if the node is folder then it has only one action – expand tree. i.e. for node action: http://www.microsoft.com, javascript:alert("Test"), mailto:iulian_iuga@yahoo.com.
  • The Tree Control can be expanded only to one branch. So, you must modify the path for the database or create a DNS for database connection in the TreeWork.asp file:

     // ' Here YOU MUST change the database path, or create a DSN
    
     // Const cstrConnectionString = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=D:\Iulian\TestTree\testtree.mdb"
    
    

    Thanks again and enjoy ...