Saravanan
Saravanan

Reputation: 11592

how to get the last child of the parent node in Tree View using asp.net?

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

Answers (1)

st mnmn
st mnmn

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

Related Questions