Hello,

I have add data to a listbox, the first and lastname.
Now I want to remove the data with a textbox. But I want only type the firstname.
If you only type the firstname, the listbox doesn't remove the item, you must type the firstname and the lastname.

My question is: how can I remove the firstname and lastname, if you just type the firstname in the textbox?

thanks in advance.

my code is:
Code:
public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            listBox1.Items.Remove(textBox1.Text);
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            listBox1.Items.Add("Maichel Johnson");
            listBox1.Items.Add("Roberto Long");

        }
    }