1、 DropDownList 默认展示从数据库查询的值
DropDownList1.Items.FindByValue(model.ClassConfig.ToString()---要展示的值).Selected = true;
2、RadioButtonList1 对查询出来的数据默认展示
foreach
(ListItem item
in
this
.RadioButtonList1.Items)
{
if (item.Value == model.IsChildorg.ToString()) // modeluser.userpower.tostring()为你要赋值的值
{
item.Selected = true ;
break ;
}
}
{
if (item.Value == model.IsChildorg.ToString()) // modeluser.userpower.tostring()为你要赋值的值
{
item.Selected = true ;
break ;
}
}