DataGrid1导出到Excel.txt - 编程吧

上一篇 | 下一篇

DataGrid1导出到Excel.txt

发布: 2006-8-22 23:14 | 作者: 未知 | 来源: 未知 | 查看: 52次


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();

TAG: 编程

字号: | 推荐给好友

 

评分:0

我来说两句

seccode