摘要:
///
///导出Excel
///
///
///
protected void ToExcel2()
{
// Response.Clear();
Response.AddHeader("content-disposition", "attachment;filename=FileName.xls");
Response.Charset = "gb2312";
Response.ContentType = "application/vnd.xls";
Response.ContentEncoding = System.Text.Encoding.UTF8;
System.IO.StringWriter stringWrite = new System.IO.Stri 阅读全文
posted @ 2010-05-09 20:16
叮当小马
阅读(482)
评论(0)
推荐(0)
摘要:
当用GridView导出Execl的时候,会发生只能在执行 Render() 的过程中调用 RegisterForEventValidation的错误提示。
有两种方法可以解决以上问题:
1.修改web.config(不推荐)
2.直接在导出Execl的页面修改
阅读全文
posted @ 2010-05-09 20:05
叮当小马
阅读(258)
评论(0)
推荐(0)