一个页面里放50个GridView控件绑定数据,打开速度慢,如何调整?
一个页面里放50个GridView控件绑定数据,打开速度慢,如何调整?
我是这么写的
private void dd1()
{
string sql = "select top 10 * from xxxx where xx='1' ORDER BY x_id DESC";
SqlDataReader mydr = SqlHelper.ExecuteReader(SqlHelper.cing, CommandType.Text, sql, null);
GridView1.DataSource = mydr;
GridView1.DataBind();
}
然后一直下去,共有50个GridView控件同时绑定数据,感觉打开有点慢;
不知如何优化?或者如何读取绑定数据为妙?