C#.net中实现从数据库中读取一列到dropdownlist控件中

项目分三层,model层里写实体类,interface里写接口,BBL或者DAL中写具体的代码。求解分别该怎么写。。

这位同学,这个问题其实非常的简单,如果你上课听了老师讲课,或者自己随便练习一下就可以搞定。

你只需要给dropdownlist绑定数据就行了,

如:string sql = @"select * from Candidate where tid='3'";
DataSet ds = SqlHelper.ExecuteDataset(conn, CommandType.Text, sql);

ddlone.DataSource = ds;

ddlone.DataBind();