Response.Clear();
Response.Buffer= true;
Response.Charset="utf-8";
Response.AppendHeader("Content-Disposition","attachment;filename=FileFlow.xls");
Response.ContentEncoding=System.Text.Encoding.GetEncoding("gb2312");
Response.ContentType = "application/ms-excel";
this.EnableViewState = false;
System.IO.StringWriter oStringWriter = new System.IO.StringWriter();
System.Web.UI.HtmlTextWriter oHtmlTextWriter = new System.Web.UI.HtmlTextWriter(oStringWriter);
this.RenderControl(oHtmlTextWriter);
Response.Write(oStringWriter.ToString());
Response.End();各位兄弟:你们好:
我用这个方法,导出保存后,页面没有刷新,不能执行其它的脚本,要从新点一下datagrid列头才可以
Response.Buffer= true;
Response.Charset="utf-8";
Response.AppendHeader("Content-Disposition","attachment;filename=FileFlow.xls");
Response.ContentEncoding=System.Text.Encoding.GetEncoding("gb2312");
Response.ContentType = "application/ms-excel";
this.EnableViewState = false;
System.IO.StringWriter oStringWriter = new System.IO.StringWriter();
System.Web.UI.HtmlTextWriter oHtmlTextWriter = new System.Web.UI.HtmlTextWriter(oStringWriter);
this.RenderControl(oHtmlTextWriter);
Response.Write(oStringWriter.ToString());
Response.End();各位兄弟:你们好:
我用这个方法,导出保存后,页面没有刷新,不能执行其它的脚本,要从新点一下datagrid列头才可以
解决方案 »
- 招兼职web程序员两个名!高薪!
- 导出excel 时 只要不用下载工具迅雷直接下载一切正常,但当使用下载工具时导出的EXCEL就为空内容,
- [AjaxPro.AjaxMethod]
- 请教一个小问题
- javascript生成的数据,cs页面中获取
- 这会是什么原因造成的??各位高手出出注意吧!!
- DataGrid数据更新问题--((TextBox)e.item.cell[2].Control[0]).Text没有反应??
- 求助,测试软件runloader
- 请教ASP.NET Web开发水质实时监测系统的问题
- 能不能用循环动态生成ID 不同的多个服务器端控件
- 哪位有使用陕北吴旗娃aspnetpager控件在ORACLE数据库上的分页例子?
- 为什么一定要设虚拟目录才运行得了啊???
Response.End();
response.redirect("你所在的页面.aspx")