- Get link
- X
- Other Apps
http://support.microsoft.com/kb/316431
Internet Explorer is unable to open Office documents from an SSL Web site
trecho de código para exportar e abrir planilha XLS
Response.Buffer = true;
Response.ClearHeaders(); // Required due an issue on IE using SSL.
Response.AddHeader("content-disposition", "attachment;filename=XXX.xls");
Response.ContentType = "application/vnd.ms-excel";
Response.Charset = "";
this.EnableViewState = false;
StringWriter oStringWriter = new StringWriter();
HtmlTextWriter oHtmlTextWriter = new HtmlTextWriter(oStringWriter);
HtmlForm frm = new HtmlForm();
this.Controls.Add(frm);
frm.Controls.Clear();
frm.Controls.Add(gvReportExport);
frm.RenderControl(oHtmlTextWriter);
Response.Write(oStringWriter.ToString());
Response.Flush();
Response.End();
Comments