FormView分页后怎样导入excel?
Response.Charset = "GB2312";Response.ContentEncoding = System.Text.Encoding.UTF7;
Response.AppendHeader("Content-Disposition", "attachment;filename=" + HttpUtility.UrlEncode(FileName, Encoding.UTF8).ToString());
Response.ContentType = FileType;
this.EnableViewState = false;
StringWriter tw = new StringWriter();
HtmlTextWriter hw = new HtmlTextWriter(tw);
——————
this.DetailFormView.RenderControl(hw); 只有一页数据时能够导入excel。多页时报错
——————
this.DetailFormView.HeaderRow.RenderControl(hw);
this.DetailFormView.Row.RenderControl(hw); ---在这种情况下,能够把当前页
导入的内容导入一部分。内容不全。
Response.Write(tw.ToString());
Response.End();
请各位大侠帮帮解决一下? --------------------编程问答-------------------- 没人回复阿!
补充:.NET技术 , ASP.NET