I was wondering, if I click a selection on a ComboBox
for instance letter A
, and I want its content to show in label
or ListBox
, how can I do that? I tried experimenting with some codes below. This codes below are not working for me. any other way or suggestion?
private void selectContents_SelectedIndexChanged(object sender, System.EventArgs e)
{
string var;
var = selectContents.Text;
if (var == "A")
{
Label1.Text = "hi";
listBox1.Text = "hi";
}
}
ok problem solve i just need to change the var :D