Dynamic tree with three child
how can i create dynamic tree in asp.net c# script with three child?
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Krishna GaradRank #191 · 12.8K reputationPosted Feb 4, 2011, 1:31 AM EST
TreeNode mainroot = new TreeNode();//Parrent
mainroot.Text="Parent";
TreeView1.Nodes.Add(mainroot);
TreeNodeCollection nodes = TreView1.Nodes;
TreeNode child1 = new TreeNode();
root2.Text = "ChildOne";
mainroot.ChildNodes.Add(child1);
and so on....