我正在使用代码从弹出窗口中导出 pdf 文件。
点击按钮
function popupReport()
{
var url = 'Report.aspx';
window.open(url, 'winPopupReport', 'width=300,height=300,resizable=no,scrollbars=no,toolbar=no,directories=no,status=no,menubar=no,copyhistory=no');
return false;
}
在 Report.aspx.cs 中
ReportDocument repDoc = ( ReportDocument ) System.Web.HttpContext.Current.Session["StudyReportCrystalDocument"];
// Stop buffering the response
Response.Buffer = false;
// Clear the response content and headers
Response.ClearContent();
Response.ClearHeaders();
try
{
repDoc.ExportToHttpResponse( CrystalDecisions.Shared.ExportFormatType.PortableDocFormat, Response, true, "StudyReport" );
}
catch( Exception ex )
{
}
该代码在 IE7 中运行良好。但在 IE6 中,弹出窗口没有关闭。为什么会发生这种情况?