views:

186

answers:

1

have a treeview control in ASP.NET and C#.

Root node (This is fixed)

---Parent Node 1 ( Parent node and child are populated from the database directly. )

----Child node1

----Child node2

---Parent node 2

Now When a value is added to a database it get added in the treeview. I cannot get a way to select the parent and child node and make it perform a function like go to another page or something...

I have the code to retrieve values from the database and display on the treenode dynamically. Just the selection is a problem.

If there is a tutorial of any other information please let me know

A: 

I think what you need to do is to go to another page where you adding your new treenode, you need to set navigateURL property

NewNode.NavigateUrl = "yourURL";
Muhammad Akhtar
this worked if you are sending all the child nodes or parent nodes to the respective pages but i wanted to know which node is getting selected also.I was able to do this by sending the value in the navigation URl itself :NewNode.NavigateUrl = "~/WebForm4.aspx?node=" + NewNode.Text;then you have to add a query string at the page you navigate to, in order to vetch the value you just passed.Thanks.