当前位置:Gxlcms > 数据库问题 > DropDownList绑定数据库

DropDownList绑定数据库

时间:2021-07-01 10:21:17 帮助过:17人阅读

this.DropDownList_设备列表.DataSource = dt_eq;//设置数据源
this.DropDownList_设备列表.DataTextField = "equipment_name";//设置所要读取的数据表里的列名
this.DropDownList_设备列表.DataValueField = "equipment_id";
this.DropDownList_设备列表.DataBind();//数据绑定
this.DropDownList_设备列表.SelectedIndex = 0;

DropDownList绑定数据库

标签:ted   sel   列表   ext   textfield   uefi   lis   field   tab   

人气教程排行