变量text记录了健康状况,下拉列表框索引为0的项是“良好”,以此类推。你要的功能可以用下面的代码实现:string text = "一般";if (text=="良好")   DropDownList_health.SelectedIndex = 0;
else if(text=="一般")   DropDownList_health.SelectedIndex = 1;
else if(text=="生活不能自理")   DropDownList_health.SelectedIndex = 2;