首页 > 开发 > 综合 > 正文

DataGrid1导出到Excel.txt

2020-02-03 16:35:42
字体:
来源:转载
供稿:网友

response.contenttype = "application/vnd.ms-excel";
response.charset = "";
this.enableviewstate = false ;
system.io.stringwriter sw = new system.io.stringwriter();
system.web.ui.htmltextwriter hw = new htmltextwriter(sw);
this.datagrid1.rendercontrol(hw);
response.write(sw.tostring());
response.end();
中国最大的web开发资源网站及技术社区,
发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表