Trying to export asp.net gridview to a .csv file

后端 未结 2 1599
耶瑟儿~
耶瑟儿~ 2021-01-29 04:20

I am trying to export a gridview to a csv file but my code seems to be only exporting the header.

Here is my code:

Protected Sub btnCSV_Click(sender As O         


        
2条回答
  •  既然无缘
    2021-01-29 05:08

    I found the solution!! Comment out

         gvReports.AllowPaging = False
         gvReports.DataBind()
    

提交回复
热议问题