1
Reply

Selected Nodes in TreeView

bdcampbe

bdcampbe

Jan 5 2005 8:20 PM
1.9k
there is a code snippet by Mahesh Chand located at; www.c-sharpcorner.com/Code/2004/Nov/TreeViewControl.asp which indicates that there is a SelectedNode property of the TreeView aps.net server control. i.e. void TreeView1_SelectedNodeChanged(object sender, EventArgs e) { TextBox1.Text = TreeView1.SelectedNode.Text; TextBox2.Text = TreeView1.SelectedNode.NavigateUrl; } This is just what I need. However, the version of the control (which I pulled off www.dot.net today) does not have this property. Rather, there is only a SelectedNodeIndex, which is a string along the lines of "0.1.1", indicating nominally where you happen to be in the tree. So, any idea how I might resolve this. Many thanks in advance... Brian C.

Answers (1)