1.前台

 <select runat="server" id="selBranch"  autowidth="true"></select>
<select runat="server" id="selLock" autowidth="true">
         <option value="" selected="selected">是否禁用...</option>
         <option value="正常">正常</option>
         <option value="禁用">禁用</option>
</select>   

2.后台

数据绑定:

     fcwms.BLL.dt_branch bll = new fcwms.BLL.dt_branch();
        DataTable dt = bll.GetList("").Tables[0];
        this.selBranch.Items.Clear();
        this.selBranch.Items.Add(new ListItem("请选择部门...", ""));
        foreach (DataRow dr in dt.Rows)
        {
            this.selBranch.Items.Add(new ListItem(dr["branch_name"].ToString(), dr["id"].ToString()));
        }

获取选中值: string a = this.selBranch.value;

相关文章:

  • 2022-01-23
  • 2022-01-04
  • 2022-02-03
  • 2022-02-15
  • 2021-06-03
  • 2022-12-23
  • 2022-03-10
猜你喜欢
  • 2022-01-25
  • 2022-12-23
  • 2021-07-12
  • 2021-10-06
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案