When I enter a text value in a textbox and click a button it should be shown in a list box. How can I do it in windows application using C# -- can any one help?How to pass a text value from textbox control to listbox control in windows application using c#?
drage text box, listbox and button.
then double click on button and write this line
listBox1.Items.Add(textBox1.Text);
Code will look like this.
private void button1_Click(object sender, System.EventArgs e)
{
listBox1.Items.Add(textBox1.Text);
}
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment