Link to home
Start Free TrialLog in
Avatar of Murray Brown
Murray BrownFlag for United Kingdom of Great Britain and Northern Ireland

asked on

ASP.net/VB.net - Get level of TreeView Node

Hi. I am looping through a TreeView using the following code.
I need to run different code based on the level of the node
By level I mean Node(0) as 0, Node(0).nodes(0) as 1 etc

    Private Sub DoRecursive(ByVal n As TreeNode)

        Add_Results_to_Node(n, n.Text)


        Dim aNode As TreeNode

        For Each aNode In n.ChildNodes

            DoRecursive(aNode)

        Next

    End Sub
ASKER CERTIFIED SOLUTION
Avatar of Wim_Bl
Wim_Bl
Flag of Belgium image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Murray Brown

ASKER

Thanks very much