Treeview: parentID & prevID

Discussion in 'C#' started by Czew, Apr 13, 2008.

  1. #1
    Hey,

    For the first question and welcoming I want to ask about treeview. :p

    I'm creating ASP treeview with ACCESS "parenting" database system/technic(or what ever you want to call it) :).

    Example
    {
    ID pID text
    1 0 aaa
    2 0 bbb
    3 1 aaa.1
    4 2 bbb.1

    With result:

    aaa
    aaa.1
    bbb
    bbb.1
    }

    with code:
    <%Do While Not rs.EOF%>

    <%
    If pID=0 then
    response.write(text)

    pID=prevID
    End If
    %>
    <%
    If prevID=pID then
    response.write("&nspb;" & text)

    End If
    %>
    <%
    rs.movenext
    loop
    %>

    Any Ideas what do I do wrong? :confused:
    Any better ways to do it?
     
    Czew, Apr 13, 2008 IP
  2. Czew

    Czew Peon

    Messages:
    5
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Does anyone get the idea of what I mean by my question? :confused:
    Or is it just no one knows how to make a "treeview" with ASP?? :mad:

    With asp.net on google search I got at the first like my answer as a static treeview.
     
    Czew, Apr 16, 2008 IP