关于我们

质量为本、客户为根、勇于拼搏、务实创新

< 返回新闻公共列表

dropdownlist下拉实现的代码分享

发布时间:2019-11-09 09:02:43

前端:

<asp:DropDownList ID="industry" runat="server"></asp:DropDownList>

后端:

//加载行业
DataTable hydt = SqlEasy.ExecuteDataTable("select * from Sys_Dics where CategoryId=102");
this.industry.DataSource = hydt;//指定行业控件数据源
this.industry.DataTextField = "Title";
//this.industry.DataValueField = "Ttile";
this.industry.DataBind();//绑定行业空间数据源



/template/Home/Zkeys/PC/Static