111,094
社区成员




string sqlstr = "select distinct(Months)+'月份' from Report";//报错:不包含名为“Months”的属性
DataSet ds = db.GetDS(sqlstr);
this.CheckBoxList1.DataSource = ds;
this.CheckBoxList1.DataTextField = "Months";
this.CheckBoxList1.DataValueField = "Months";
this.CheckBoxList1.DataBind();
string sqlstr = "select distinct(Months)+'月份' as Months from Report";//
string sqlstr = "select distinct(Months)+'月份' as Months from Report";//这样就可以了
DataSet ds = db.GetDS(sqlstr);
this.CheckBoxList1.DataSource = ds;
this.CheckBoxList1.DataTextField = "Months";
this.CheckBoxList1.DataValueField = "Months";
this.CheckBoxList1.DataBind();