问个问题
Response.ContentType   =   "application/octet-stream";      
  Response.AddHeader("Content-Disposition",   "attachment;filename="   +   HttpUtility.UrlEncode(lContentID   +   ".wmv"));      
  Response.AddHeader("Content-Length",   fileBuffer.Length.ToString());  
  Response.BinaryWrite(fileBuffer);  
  ------------  
  Response.Write("<script>window.opener =null;document.close()</script>");
这个执行不了,IE关不了, 

解决方案 »

  1.   

    Response.Write("<script>window.opener =null;window.close()</script>");
      

  2.   

    把document 换成window 试试。
      

  3.   

    window.close()
    看看
    如果不是open出来的,估计还有一个提示
      

  4.   

    Response.BinaryWrite的窗口无法执行js了。你只能让用户自己关闭
      

  5.   

    把Response.Write("<script>window.opener =null;window.close()</script>");注释掉
    加如下两条
    Response.Flush();
    Response.End();
      

  6.   

    Response.ContentType = "application/octet-stream"; 输出的已经是2进制流了,已经不是HTML内容了。你写的js不会执行的
      

  7.   

    没办法,只能用户自己点关闭,要么你下载文件的链接就不要做弹出一个新窗口,就本页面<a href="download.aspx?id=101">下载</a> 不写target='_blank'
      

  8.   

    我原来的ASPX怎么办呢,我要保持原来的ASPX状态。