急!dropdownlist与gridview
dtopdownlist已绑定数据库,希望等够实现点击Button,gridview显示初相应信息,但是点击后什么都不显示 ,请高手帮忙
protected void Button3_Click(object sender, EventArgs e)
{
this.GridView1.DataSourceID = null;
DataTable dt = new DataTable();
String cmdText = "select * from Student where Scol='" + DropDownList4.Text + "'and Sdept='" + DropDownList5.Text + "'and Sclass='" + DropDownList3.Text + "'";
dt = Teacher.SelectRecords(cmdText);
this.GridView1.DataSource = dt;
this.GridView1.DataBind();
this.GridView1.Visible = true;
}