Excel导出(gridview中的数据),在360中部分页面,点击导出按钮 本该弹出的保存对话框闪一下就不见了。
但是在IE中是好的全部可以导出。但是在360中部分页面出现上述状况,不知道是什么原因?向高手求助!GridView1.AllowPaging=false;bind();R...
但是在IE中是好的全部可以导出。但是在360中部分页面出现上述状况,不知道是什么原因?向高手求助!
GridView1.AllowPaging = false;
bind();
Response.Clear();
Response.Buffer = true;
Response.Charset = "GB2312";
Response.ContentEncoding = System.Text.Encoding.Default;
Response.AppendHeader("Content-Disposition", "attachment;filename=" + HttpUtility.UrlEncode(FileName, Encoding.UTF8).ToString());
Response.ContentType = FileType;
this.EnableViewState = false;
GridView1.Columns[GridView1.Columns.Count - 1].Visible = false;
GridView1.Columns[GridView1.Columns.Count - 2].Visible = false;
StringWriter tw = new StringWriter();
HtmlTextWriter hw = new HtmlTextWriter(tw);
GridView1.RenderControl(hw);
Response.Write(tw.ToString());
//Response.Output.Write(tw.ToString());
//Response.Flush();
Response.End();
谁帮帮我啊! 展开
GridView1.AllowPaging = false;
bind();
Response.Clear();
Response.Buffer = true;
Response.Charset = "GB2312";
Response.ContentEncoding = System.Text.Encoding.Default;
Response.AppendHeader("Content-Disposition", "attachment;filename=" + HttpUtility.UrlEncode(FileName, Encoding.UTF8).ToString());
Response.ContentType = FileType;
this.EnableViewState = false;
GridView1.Columns[GridView1.Columns.Count - 1].Visible = false;
GridView1.Columns[GridView1.Columns.Count - 2].Visible = false;
StringWriter tw = new StringWriter();
HtmlTextWriter hw = new HtmlTextWriter(tw);
GridView1.RenderControl(hw);
Response.Write(tw.ToString());
//Response.Output.Write(tw.ToString());
//Response.Flush();
Response.End();
谁帮帮我啊! 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询