treeview

A

ally

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!!!!
 
M

Marshal Antony

Hi,


Microsoft.Web.UI.WebControls.TreeNode tn=new
Microsoft.Web.UI.WebControls.TreeNode();

tn=Treeview1.GetNodeFromIndex(Treeview1.SelectedNodeIndex);

myNodeName=tn.Text

Hope this helps.

Regards

Marshal Antony

(e-mail address removed)

http://dotnetmarshal.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,525
Members
44,997
Latest member
mileyka

Latest Threads

Top