Reputation: 11592
I have created tree view in asp.net.I want to get the last child node of the current selected Parent Node.
Please Guide me get out of this issue?
Upvotes: 0
Views: 5261
Reputation: 3667
use this code to get the last child node in the current selected node:
TreeNode t=TreeView1.SelectedNode.ChildNodes[TreeView1.SelectedNode.ChildNodes.Count - 1];
Hope this helped you.
Upvotes: 3