treeview Dynamic first node remain expand on treenodeexpand event asp.net
I'm using a treeview in which I'm adding dynamic nodes
but when I call treenodeexpand event only first node is expanded while treenodeexpand event is called each time

Kindly help me 
here is sample code

protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                TreeNode node1 = new TreeNode("Parent1", "1");
                TreeNode node2 = new TreeNode("Parent2", "1");
                TreeNode node3 = new TreeNode("Parent3", "1");

                TreeNode child11 = new TreeNode("Child11", "1");
                TreeNode child21 = new TreeNode("Child21", "2");
                TreeNode child31 = new TreeNode("Child31", "3");

                TreeView1.Nodes[0].ChildNodes.Add(node1);
                TreeView1.Nodes[0].ChildNodes.Add(node2);
                TreeView1.Nodes[0].ChildNodes.Add(node3);

                node1.ChildNodes.Add(child11);

                node1.SelectAction = TreeNodeSelectAction.SelectExpand;
                node2.ChildNodes.Add(child21);
                node2.SelectAction = TreeNodeSelectAction.SelectExpand;
                node3.ChildNodes.Add(child31);
                node3.SelectAction = TreeNodeSelectAction.SelectExpand;

                TreeView1.CollapseAll();
            }
        }

        protected void TreeView1_TreeNodeExpanded(object sender, TreeNodeEventArgs e)
        {
            
            Label1.Text = e.Node.Text;
        }

Thanx in advance 

treeview Dynamic first node remain expand on treenodeexpand event asp.net
===

I'm using a treeview in which I'm adding dynamic nodes
but when I call treenodeexpand event only first node is expanded while treenodeexpand event is called each time

Kindly help me 
here is sample code

protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                TreeNode node1 = new TreeNode("Parent1", "1");
                TreeNode node2 = new TreeNode("Parent2", "1");
                TreeNode node3 = new TreeNode("Parent3", "1");

                TreeNode child11 = new TreeNode("Child11", "1");
                TreeNode child21 = new TreeNode("Child21", "2");
                TreeNode child31 = new TreeNode("Child31", "3");

                TreeView1.Nodes[0].ChildNodes.Add(node1);
                TreeView1.Nodes[0].ChildNodes.Add(node2);
                TreeView1.Nodes[0].ChildNodes.Add(node3);

                node1.ChildNodes.Add(child11);

                node1.SelectAction = TreeNodeSelectAction.SelectExpand;
                node2.ChildNodes.Add(child21);
                node2.SelectAction = TreeNodeSelectAction.SelectExpand;
                node3.ChildNodes.Add(child31);
                node3.SelectAction = TreeNodeSelectAction.SelectExpand;

                TreeView1.CollapseAll();
            }
        }

        protected void TreeView1_TreeNodeExpanded(object sender, TreeNodeEventArgs e)
        {
            
            Label1.Text = e.Node.Text;
        }

Thanx in advance 
