Quantcast
Channel: AuthorCode » ListBox control
Viewing all articles
Browse latest Browse all 9

Add textbox value to a list box by clicking a button in vb.net

$
0
0

 
Following example describe to add textbox value to a list box by clicking a button in vb.net

This example requires windows form that contains Listbox, Textbox and one button control.

  1. Private Sub Button1_Click(ByVal sender As System.Object, _
  2.                               ByVal e As System.EventArgs) Handles Button1.Click
  3.         If TextBox1.Text.Trim() <> "" Then
  4.             ListBox1.Items.Add(TextBox1.Text.Trim())
  5.         End If
  6. End Sub

Viewing all articles
Browse latest Browse all 9

Trending Articles