Search code examples
c#asp.nettreeviewnavigateurl

treeview problem


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


Solution

  • 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";