SqlDataSource sqlDataSource1 = new SqlDataSource
("server=(local);uid=sa;pwd=1234qwer;database=project;", "select * from Student");
SqlDataSource sqlDataSource2= new SqlDataSource
("server=(local);uid=sa;pwd=1234qwer;database=project;", "select * from Score");
protected void Button1_Click(object sender, EventArgs e)
{
girdview1.DataSource = sqlDataSource1;
girdview1.DataBind();
}
protected void Button2_Click(object sender, EventArgs e)
{
girdview1.DataSource = sqlDataSource2;
girdview1.DataBind();
}
gridview1.count --- 有这个属性?