Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

displaying tree structure 1

Status
Not open for further replies.

ArmenD

Programmer
Feb 3, 2005
101
US
how do i create & render a tree structure of categories in asp.net using vb?

i want to render the following on a web page...

Animal->Dog
->Cat
->meow
->Horse
Tree -> Pine
-> Redwood
-> Some other tree
->Big
->not too big

i am hoping there is some kind of data structure that already does this. src code or links to is appreciated.
 
thread855-1022791

----------------------------------------------------------------------

Need help finding an answer?

Try the search facilty ( or read FAQ222-2244 on how to get better results.
 
ca8msm,
your full of good suggestions, thanks
 
i am trying to find an example that shows how i can display a treeview control horizontally...

example
a->b->c

how is this done? I just want the look of a linked list?
 
Could you just use HyperLink controls? They could just be created dynamically when needed to make the "look of a linked list" display that you are looking for.

--------------------------------------------------------------------------------------------------------------------------------------------

Need help finding an answer?

Try the search facility ( or read FAQ222-2244 on how to get better results.
 
can u elaborate on how it can be made dynamically without refreshing the page?
 
I'm not sure I understand why you need to do it without refreshing the page. Surely by the Page Load you will know what links need to be displayed.

Although I mentioned hyperlink controls, for a simpler example I have just used a literal control and set the text property by using anchor tags. See if this is the type of solution you are looking for:
Code:
    Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        'Put user code to initialize the page here

        Dim lit As New LiteralControl
        For i As Integer = 1 To 5
            lit.Text &= "<a href=""" & i & ".aspx""> " & i & "</a> > "
        Next
        Panel1.Controls.Add(lit)

    End Sub

--------------------------------------------------------------------------------------------------------------------------------------------

Need help finding an answer?

Try the search facility ( or read FAQ222-2244 on how to get better results.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top