【发布时间】:2013-12-19 09:51:40
【问题描述】:
我正在使用以下代码打开 pdf byte[] 文件而不保存它。它工作正常,但在此操作之后,没有其他服务器端操作(如按钮单击)不起作用。回发不起作用。
byte[] bytfile = Objects.GetFile(Convert.ToInt32(txtslno.Text.Trim()));
Response.Clear();
Response.ClearContent();
Response.ClearHeaders();
Response.ContentType = "application/pdf";
Response.AddHeader("Content-Disposition", "attachment;filename="+filename);
Response.AddHeader("Content-Length", bytfile.Length.ToString());
Response.OutputStream.Write(bytfile, 0, bytfile.Length);
Response.Flush();
Response.End();
【问题讨论】: