在ASP.NET
2
.0中将GridView中的数据全部导出到Excel中,请参考下述代码(以手动绑定数据源为例):
Defualt.aspx中,添加一个GridView控件
< form id = " form1 " runat = " server " >
< div >
< asp:GridView ID = " GridView1 " runat = " server " AllowPaging = " true " OnPageIndexChanging = " paging " >
</ asp:GridView >
</ div >
< asp:Button ID = " Button1 " runat
Defualt.aspx中,添加一个GridView控件
< form id = " form1 " runat = " server " >
< div >
< asp:GridView ID = " GridView1 " runat = " server " AllowPaging = " true " OnPageIndexChanging = " paging " >
</ asp:GridView >
</ div >
< asp:Button ID = " Button1 " runat