How to get selected item from Combobox control in

Following example code demonstrate how to find selected item of combobox control in with the help of Combobox1.Selecteditem property.

Combobox1.Selecteditem is the currently selected item in ComboBox control and if there is no currently selected item then it is nothing.

Private Sub GetSelecteditem()
        Dim Selecteditem As String = ""
        If (Combobox1.Selecteditem <> "") Then
            Selecteditem = Combobox1.Selecteditem
            MessageBox.Show("selected item is " & Selecteditem)
        End If
End Sub

SelectedIndex property of combobox control is also important, you can get the index of selected item in combobox.