html5中文学习网

您的位置: 首页 > 网络编程 > ASP.NET » 正文

DataGrid1导出到Excel.txt_.NET教程_编程技术

[ ] 已经帮助:人解决问题
datagrid|excel

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();
if5HTML5中文学习网 - HTML5先行者学习网
if5HTML5中文学习网 - HTML5先行者学习网
(责任编辑:)
推荐书籍
推荐资讯
关于HTML5先行者 - 联系我们 - 广告服务 - 友情链接 - 网站地图 - 版权声明 - 人才招聘 - 帮助