Мое приложение выдвигает PDF-файл в всплывающее окно браузера (например, без меню / панели инструментов) (в ответ на нажатие пользователем кнопки). Это работает для любого браузера, кроме IE7. В IE7 все, что я получаю, это пустое окно.
Вот код на стороне сервера, который выдвигает PDF:
private void StreamPDFReport(string ReportPath, HttpContext context)
{
context.Response.Buffer = false;
context.Response.Clear();
context.Response.ClearContent();
context.Response.ClearHeaders();
// Set the appropriate ContentType.
context.Response.ContentType = "application/pdf";
context.Response.AddHeader("Content-Disposition", "inline; filename=Report.pdf");
context.Response.Cache.SetCacheability(HttpCacheability.NoCache);
// Write the file directly to the HTTP content output stream.
context.Response.WriteFile(ReportPath);
HttpContext.Current.ApplicationInstance.CompleteRequest();
//context.Response.End();
}
На стороне клиента, когда пользователь нажимает кнопку, в обработчике onClick происходит следующее:
onclick = "window.open ('RptHandler.ashx? RptType = CaseInfo', 'Report', 'top = 10, left = 10, width = 1000, height = 750')
Я что-то упускаю из виду? Почему это работает в каждом браузере, но не в IE?