Im in the mids of creating some sore of a wizard for my web app. i have a listbox on one side and a treeview on the other. Each time an item is selected from the listbox it is added to the treeview as a node which kinda duplicates the steps you have taken. Anyways what i want to add is the option for the user to click any of the nodes in the treeview so that it can go back to that particular step. Since im adding all the nodes as text and i dont track their location in the treeview its hard to identify which one to remove. So what i basically need is somehow to remove all the nodes up to the one that was selected, going from the last node to the selected one.
This is what i have so far but it deosnt work.
for (int i = trvSelections.Nodes.Count-1 ; trvSelections.Nodes[i].Value.Equals(trvSelections.SelectedNode.Text); i--)