How to use TreeView Control and WebBrowser Control in C#.Net
TreeViews have plus symbols that we can click. To add one to our form find tree view control on tool box and use it in your form.
Now, to add Nodes to the TreeView, click the TreeView to select it. Then locate the Nodes property in the properties area
Click the button with the three dots in it, just to the right of Collection. You'll then see the TreeNode Editor Dialogue box.
There are two types of Nodes you can Add - a Root Node and a Child Node. Click the Add Root button.
Set the following properties:
Now, add a webBrowser to the form.
Now write the code for TreeView control’s at NodeMouseClick Event.
private void treeView1_NodeMouseClick(object sender, TreeNodeMouseClickEventArgs e)
TreeNode nName = e.Node;
string webPage = "";
webPage = (string)nName.Tag;
//seting webPage to node tag string.
if (webPage != "")
//Navigating to webPage address.