C
christof
I've got a really easy problem, please help me:
There are two pages in one I'm creating a TreeView like that:
TreeView dbTree = new TreeView();
TreeNode dbTreeRoot = new TreeNode("Root");
dbTree.Nodes.Add(dbTreeRoot);
..
..
- so my complete TreeView is populated in that code.
Now I wish to pass this whole TreeView to another site, where I've got
my TreeView Control:
<asp:TreeView ID="TreeView2" runat="server">
</asp:TreeView>
So how to pass this tree to put it into that control??
I thing that it should be a function in the second page:
public void FetchTree(TreeView source_tree)
{
// - the code, I've tried TreeView2 = source_tree, but it's not a solution
}
Or the only way is to save a TreeView to XML in a first, and then to
retrive it from XML in a second page to the control directly.
Thank you in advance!
There are two pages in one I'm creating a TreeView like that:
TreeView dbTree = new TreeView();
TreeNode dbTreeRoot = new TreeNode("Root");
dbTree.Nodes.Add(dbTreeRoot);
..
..
- so my complete TreeView is populated in that code.
Now I wish to pass this whole TreeView to another site, where I've got
my TreeView Control:
<asp:TreeView ID="TreeView2" runat="server">
</asp:TreeView>
So how to pass this tree to put it into that control??
I thing that it should be a function in the second page:
public void FetchTree(TreeView source_tree)
{
// - the code, I've tried TreeView2 = source_tree, but it's not a solution
}
Or the only way is to save a TreeView to XML in a first, and then to
retrive it from XML in a second page to the control directly.
Thank you in advance!