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

后端 未结 2 1618
耶瑟儿~
耶瑟儿~ 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:12

    in place

    gvReports.DataBind() 
    

    call function

    me.binddata() 
    

    that can load data to gridview. binddata is the function name

提交回复
热议问题