Binding a TreeView control
<p>I am using ASP.NET and C# to bind a tree view control in my application. The following code is used in WinForms, but it's not working in WebForms. Can someone help to convert this to WebForms?</p>

<pre><code>private TreeNode AddNode(TreeNode node, string key)
{
    if (node.Nodes.ContainsKey(key))
    {
        return node.Nodes[key];
    }
    else
    {
        return node.Nodes.Add(key, key);
    }
}
</code></pre>

<p>I want to implement the same logic. In WebForms we do not have method <code>node.nodes</code>, or <code>node.nodes.Containskey()</code>.</p>
