No Collapse/Expand icon in TreeView when using ASP.NET and C#
<p>I have a trouble with Expand / Collapse icon in TreeView</p>

<p>What I get : <a href="http://i.imgur.com/dl5Lg.jpg" rel="nofollow">http://i.imgur.com/dl5Lg.jpg</a></p>

<p>What I did :</p>

<p>C# code :</p>

<pre><code>public static void TreeLoad(TreeView tree, string @source)
        {
            XmlDocument document = new XmlDocument();
            //TreeView tree = new TreeView();
            try
            {
                if (File.Exists(source))
                {
                    document.Load(source);
                    tree.Nodes.Clear();

                    XmlNodeList category = document.SelectNodes("/parent/Categories");
                    //XmlNodeList links = document.SelectNodes("/parent/Categories/link");

                    foreach (XmlNode node in category)
                    {
                        TreeNode t1 = new TreeNode(node.Attributes["Name"].Value);
                        tree.Nodes.Add(t1);
                        //t1.ShowCheckBox = true;

                        if (node.HasChildNodes)
                        {
                            //foreach (XmlNode nod in links)
                            foreach (XmlNode nod in node.ChildNodes)
                            {
                                TreeNode t2 = new TreeNode(nod.Attributes["name"].Value);
                                tree.Nodes.Add(t2);
                            }
                        }
                    }
                    //tree.Nodes[0].CollapseAll();
                    //document.Save(source);
                }
                else
                {
                    messages = NOTFOUND;
                }
            }
            catch (Exception ect)
            {
                //exist.InnerText = ect.Message;
                messages = ect.Message;
            }
            finally
            {
               // document.Save(source);
            }

            //return tree;
        }


 URLStorageCtrl.TreeLoad(tree, "example.xml");
</code></pre>

<p>ASP.NET code</p>

<pre><code>&lt;asp:TreeView ID="tree" runat="server"&gt;&lt;/asp:TreeView&gt;
</code></pre>

<p>I'm using 4-tier architecture so please do not redirect me to design page, I use only coding.</p>
