【发布时间】:2021-02-01 20:22:12
【问题描述】:
protected void loadCandidate()
{
con.Open();
MySqlCommand cmd = new MySqlCommand("select studentID ,name from candidate ", con);
MySqlDataReader dr = cmd.ExecuteReader();
if (dr.HasRows == true)
{
GridView1.DataSource = dr;
GridView1.DataBind();
}
}
我正在使用 gridview 来显示候选人。我想显示基于教师的网格视图(现在网格视图正在显示所有候选人)。 When the voter login to thier account, if the voter belong to faculty MCLR, then the gridvire will only display the candidate belong to faculty MCLR, all other candidate belong to other faculty will not be shown.
【问题讨论】: