level 1
当下拉菜单选择1,在后台获取的内容是a,选择2,获取的内容是b,代码要怎么写,我是菜鸟,请讲详细点
2016年11月26日 08点11分
1
level 6
在控件的编辑项里写
Text= a value=1
Text= b value=2
2017年01月13日 08点01分
2
level 1
private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
{
if (comboBox1.SelectedIndex == 0)
{
comboBox1.Text = "1";
textBox1.Text = "a";
}
else
{
comboBox1.Text = "2";
textBox1.Text = "b";
}
}
2017年03月29日 08点03分
3
level 1
在combobox属性 items中设置text值
2017年03月29日 08点03分
4