2つのリストボックス、2つのテキストボックスとボタンがあります。ボタンを押すと、リストボックス1の項目がリストボックス2に移動しますが、選択した項目をテキストフィールドに表示したいのですが、どうすればよいですか?
txtbox.Text = listbox3.selecteditem.value;
動作していません、私も試しました
txtbox.Text = listbox3.selecteditem.tostring();
これが私のコードです。'ma新鮮で、asp.netの新機能
if (RadioButton1.Checked == true)
{
a = ListBox3.SelectedValue.ToString();
b = ListBox3.SelectedIndex;
ListBox4.Items.Add(a);
ListBox3.Items.RemoveAt(ListBox3.Items.IndexOf((ListBox3.SelectedItem)));
TextBox1.Text = RadioButton1.Text.ToString();
TextBox2.Text = ListBox3.SelectedItem.Value;
}