treeview

  • Thread starter Thread starter selen
  • Start date Start date
S

selen

I have a treeview in my ASP.NET c# application.when someone selects a node
on the treeview How do I set the node name
myNodeName = TreeView1.Nodes(TreeView1.SelectedNodeIndex).Text
The above code only gave me the value of the parent Node
Any and all help would be greatly appreciated!!!!
 
Direct.

string result = myTreeView.SelectedNode.Text;

or
Extract the node:

TreeNode tn = myTreeView.SelectedNode;
string result = tn.Text;

hope that helps
jax
 
Back
Top