摘要:
绑定数据源:ddlt_Sex.DataSource = (DictionarySet.GetSexList()).DefaultView;//ddlt_Sex是DropDownList的ID//DictionarySet类 GetSexList是该类的静态方法 通过存储过程获取Sex表的字段ddlt_Sex.DataTextField="Name";ddlt_Sex.DataValueField="ID";ddlt_Sex.DataBind();获取绑定的值:DropDownList1.SelectedItem.Text; //得到DataTextFie 阅读全文