How To Get Selected Node Text And Name From TreeView Using Visual Basic .Net
In this VB.NET Tutorial we will see How To Get The Selected TreeView Node Name Or Text And Display The Values Into A TextBox On treeView AfterSelect Event In Visual Basic.Net Programming Language And Visual Studio Editor.
Project Source Code:
Public Class Get_TreeView_Node_Text_Name
Private Sub TreeView1_AfterSelect(sender As Object, e As TreeViewEventArgs) Handles TreeView1.AfterSelect
' get node text
TextBox1.Text = TreeView1.SelectedNode.Text
' get node name
TextBox1.Text = TreeView1.SelectedNode.Name
End Sub
End Class
OutPut:
Download Projects Source Code