I am populating treeview using XML and then trying to access the nodes of treeview
into webbrowser to view the files using the following code..

Can anyone please guide me with this??

private void treeView1_MouseDoubleClick(object sender, MouseEventArgs e)

The following is the function to build treeview:-

private void BuildTreeView(XmlDocument doc)
            treeView1.Nodes.Add(new TreeNode(doc.DocumentElement.Name));
            TreeNode tNode = new TreeNode();
            tNode = treeView1.Nodes[0];

            AddNode(doc.DocumentElement, tNode);


It should be as follows:-


This will work perfectly fine...

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.