I have a function where I get the parent and the childnode and i want each time the user clicked on the sitemap wich is composed by the following code:
Label_fatdata.Text += "<a id="fatdata" style="removed:pointer; margin-removed0px; text-transform:uppercase; font-size:10px; font-weight:500;" önclick="\"click(TreeView1," snode="" mode="hold" />
i want that redraws the main tree with the node (parent + child) that he gets from the backup tree. But so far I am having a lot of problems...first in if clause i need to verify the element 'a' with the backup tree.
void click(TreeView one, TreeView two)
if (one.SelectedNode.ValuePath == two.SelectedNode.ValuePath)
TreeNode parentdata = two.SelectedNode.Parent;
TreeNodeCollection childdata = two.SelectedNode.ChildNodes;
Instead of comparing the trees like in your code, an easier approach would be to :
1. Save the value the user selects to a session or viewstate variable
2. When redrawing the tree, add If condition to do what you want with the parent child nodes if the value of the node being redrawn = the saved variable. You can do this in the TreeView.TreeNodeDataBound event. simple.
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)