public void DatabindClass2()
{
string drop1 = this.DropDownList1.SelectedValue;
DropDownList2.DataSource = new Class1_bll().SelectClasss_2(drop1);
DropDownList2.DataTextField = "cname";
DropDownList2.DataValueField = "classid_2";
DropDownList2.DataBind();
}
#region 绑定class2表
public DataTable SelectClasss_2(string classid)
{
DataTable dt = new DataTable();
string sql = "select * from class_2 where classid_1='"+classid+"'";
dt = hepler.ExecuteQuery(sql,CommandType.Text);
return dt;
}
#endregion