Click here to Skip to main content
15,860,972 members
Articles / Web Development / IIS
Article

A Tree Control using ASP

Rate me:
Please Sign up or sign in to vote.
2.78/5 (8 votes)
15 May 2000 287.6K   4K   35   45
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 ...

    License

    This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

    A list of licenses authors might use can be found here


    Written By
    Web Developer
    Germany Germany
    This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

    Comments and Discussions

     
    GeneralRe: iam also getting the same error 1.5 please help Pin
    bunso24-Oct-03 14:00
    bunso24-Oct-03 14:00 
    Generaltfrtrt Pin
    Anonymous4-Dec-02 20:01
    Anonymous4-Dec-02 20:01 
    Generaltfrtrt Pin
    Anonymous4-Dec-02 19:35
    Anonymous4-Dec-02 19:35 
    Generaltree control in debug watch window Pin
    5-May-02 19:32
    suss5-May-02 19:32 
    GeneralRe: tree control in debug watch window Pin
    Iulian Iuga10-May-02 1:38
    Iulian Iuga10-May-02 1:38 
    GeneralASP tree view Pin
    17-Apr-02 21:15
    suss17-Apr-02 21:15 
    GeneralRe: ASP tree view Pin
    Anonymous26-Aug-02 10:43
    Anonymous26-Aug-02 10:43 
    GeneralRe: ASP tree view Pin
    Anonymous28-Oct-02 20:20
    Anonymous28-Oct-02 20:20 
    Roll eyes | :rolleyes: Mad | :mad: Dead | X| Suspicious | :suss: Cool | :cool: Eek! | :eek: Rose | [Rose] Smile | :) ;);PBig Grin | :-D Frown | :( -OCry | :(( Sleepy | :zzz: WTF | :WTF: OMG | :OMG:
    GeneralRe: ASP tree view Pin
    ngocha7-Apr-04 18:20
    ngocha7-Apr-04 18:20 
    QuestionIt is possible to have Action on folder level? Pin
    jezmun4-Apr-02 23:06
    jezmun4-Apr-02 23:06 
    GeneralMuito legal Pin
    5-Oct-01 8:12
    suss5-Oct-01 8:12 
    Questioncan i get the parent item value from the selected item? Pin
    6-May-01 18:43
    suss6-May-01 18:43 
    QuestionCan many branches be expanded at a time? Pin
    Mohit25-Apr-01 5:01
    Mohit25-Apr-01 5:01 
    AnswerRe: Can many branches be expanded at a time? Pin
    17-Jun-01 23:02
    suss17-Jun-01 23:02 
    GeneralAdjustable Frames(Urgent) Pin
    Gopal19-Aug-00 0:12
    Gopal19-Aug-00 0:12 
    GeneralRe: Adjustable Frames(Urgent) Pin
    22-Dec-00 15:17
    suss22-Dec-00 15:17 
    GeneralRe: Adjustable Frames(Urgent) Pin
    6-Apr-01 10:10
    suss6-Apr-01 10:10 
    Generallklkkkk Pin
    10-Apr-02 21:10
    suss10-Apr-02 21:10 
    GeneralRe: Adjustable Frames(Urgent) Pin
    Anonymous4-Dec-02 22:47
    Anonymous4-Dec-02 22:47 
    GeneralTreeItem Pin
    Mike Rosapepe23-May-00 4:03
    sussMike Rosapepe23-May-00 4:03 

    General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

    Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.