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;
               }
           }

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-01-12
  • 2021-09-16
  • 2021-06-19
  • 2022-12-23
  • 2021-08-14
猜你喜欢
  • 2021-06-22
  • 2022-12-23
  • 2021-10-10
  • 2021-06-03
  • 2022-12-23
  • 2021-06-14
  • 2021-05-30
相关资源
相似解决方案