Gridview not populating while using a While() structure. C# ASP.Net

后端 未结 6 1429
礼貌的吻别
礼貌的吻别 2021-01-22 18:46

I am having problems with this grid view. I am populating it with a query. However, it will not populate or even appear if I use a while(reader.Read()) structure. Without the

6条回答
  •  清歌不尽
    2021-01-22 18:53

    replace the following line

    grdEvents.DataSource = myReader;
    

    with

    grdEvents.DataSource = myList;
    

提交回复
热议问题