You use reverse recursion. Instead of passing the child node
and iterating through child nodes, you do the exact oppositie.
You call the method recursively always passing the node.ParentNode
as the parameter testing each time to see if .ParentNode is null
(or possible equal to itself).
--
Robbe Morris - 2004/2005 Microsoft MVP C#
EggHeadCafe's RSS Search Engine
http://www.eggheadcafe.com/articles/...h/default.aspx
"Abdul H S via DotNetMonster.com" <fo***@DotNetMonster.com> wrote in message
news:53***********@DotNetMonster.com...
I am facing difficulty to make sql on the basis of user selected node in
treeview.After selection of the particulare treenode I want to traverse
the
hierarchy up to rootnode.plz help me regarding this.
Thanks