How To Add Value To A Combobox Using Visual Basic.Net
In This VB.Net Tutorial We Will See How To Insert Values To ComboBox From TextBox Or Another ComboBox On Button Click In Visual Basic.Net Programming Language And Visual Studio Editor.
Project Source Code:
Public Class AddValueToCombobox
Private Sub BTN_ADDVal_Click(sender As Object, e As EventArgs) Handles BTN_ADDVal.Click
' add value from textbox
ComboBox1.Items.Add(TextBox1.Text)
' add value from textbox in specific index
ComboBox1.Items.Insert(0, TextBox1.Text)
' add value from another combobox
ComboBox1.Items.Add(ComboBox2.SelectedItem)
End Sub
End Class
///////////////OUTPUT: