Hello guys , can you help me how to get the ID from mysql DB , if the listview is click the name and the ID well retrieve to textbox1 and textbox2, i dont know how to get the ID?, on the listview the ID wasnt retieve ,
can you help me how to retrieve the ID from db

this is my code

  Private Sub ListView1_ItemSelectionChanged(sender As Object, e As ListViewItemSelectionChangedEventArgs) Handles ListView1.ItemSelectionChanged
    If ListView1.SelectedItems.Count > 0 Then
        With ListView1.SelectedItems.Item(0)
            TextBox1.Text = ListView1.SelectedItems(0).Text
            '      TextBox4.Text = ListView1.SelectedItems(1).Text
            PictureBox1.Image = ListView1.LargeImageList.Images(e.Item.ImageKey)
        End With
    End If
End Sub


I dont know how to retrieve the ID to textbox4 but i already retrieve the name and the image

can you help me how to retrieve ID if ID primary was not retrieve on listview

Be a part of the DaniWeb community

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