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

后端 未结 6 1482
礼貌的吻别
礼貌的吻别 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:58

    create a class with two properties 1. decTicketCost 2. intTicketCount

    now in while loop create instance and assign the value to the object properties

    and add it in a list.

    Finally bind the list.

提交回复
热议问题