***Response.write失效
本人使用下面的代码来实现DATATABLE中的数据用Excel导出。
StringWriter strKKExcel;
this.Response.Write("<script language='javascript'>alert('65000行を超えました、CSVの形式でアウトプットしましょう。');</script>");
strKKExcel = KKExcel.DTToCSV(DTOutput1);//此处是把datatable中的数据读出来。
this.Response.ContentType = "application/vnd.ms-Excel"; //如果加了这句话,上面的this.Response.Write就失效了。怎么办???
this.Response.ContentEncoding = System.Text.Encoding.GetEncoding("GB2312");
this.Response.Write(strKKExcel);
在线等待。。。。
目的就是想让页面跳出一个提示给用户看一下,仅此而已。有没有别的办法,可以告知一下。