ClientScript.RegisterStartupScript not working with ie7
<p>Edit... to put it more simple, I need to make this line to work in IE7</p>

<pre><code>  Page.ClientScript.RegisterStartupScript(Me.GetType(), "click", "window.open('appData/test.xls','','location=no,resizable=yes,scrollbars=yes');", True)
</code></pre>

<p>it works in I8, but blinks in I7, the same if I use a pdf. if I try with a txt, works perfect in both.</p>

<p>Original Question...</p>

<p>I need to call for the windows.open java instruction to show an excel or a pdf that I create dinamically from an active.report document, I have try a looootss of response headers that I have found in the web but nothing seems to work with Ie7, the page blinks for a second and disappear. I can't make any modification on the configuration of the Ie7 'not allowed by the client', or puting the windows.open on the onclick event of the button, because I need to generate the report dinamically first. this works perfect with Ie8 and Ie6, the problem is Ie7. It's been two weeks I've been looking for a solution, I would really appreciate some help. here is the code.</p>

<p>pd. when I use text/plain works, the problem is with pdf or excel.</p>

<pre><code>''' buttonclick sub

Dim str As String = ""

str = "&lt;script&gt;window.open('ShowReport.aspx?tipoExcel=1&amp;filename=" &amp; fileName &amp; "','','location=no,resizable=yes,scrollbars=yes');&lt;/script&gt;"

Page.ClientScript.RegisterStartupScript(Me.GetType, "", str)

'''''ShowReport.aspx

    Response.ClearHeaders()
    Response.Clear()
    Response.ClearContent()

    If Request.QueryString("tipoExcel") = 1 Then
        Response.AddHeader("Content-Disposition", "attachment;filename=" + Request.QueryString("filename") + ".xls")
        Response.ContentType = "application/vnd.ms-excel"

        Response.BinaryWrite(SessionHandler.xlsReport)

    Else
        Response.ContentType = "application/pdf"
        Response.BinaryWrite(SessionHandler.PdfReport)
    End If


    Response.End()

''''' responses I have try

 Response.AddHeader("Content-Disposition", "attachment; filename=Report.pdf")
 Response.AddHeader("Content-Length", "2670")
 Response.ContentType = "application/pdf"
 Response.WriteFile("appdata\prueba.pdf")
 Response.AppendHeader("Cache-Control", "must-revalidate, post-check=0, pre-check=0")
 Cache-Control: must-revalidate, post-check=0, pre-check=0' 
 Response.AppendHeader("Accept-Ranges", "bytes")
 Response.AppendHeader("Connection", "Keep-Alive")
 Response.AppendHeader("Keep-Alive", "timeout=10, max=100")
 Response.AppendHeader("Proxy-Connection", "Keep-Alive")
 Response.AppendHeader("Content-Range", "bytes 100-1165392/1165393")
 Response.AppendHeader("Cache-Control", "private")
 Response.AppendHeader("content-disposition", "inline; filename=Report.pdf")
 Response.AppendHeader("Expires", "0")
 Response.AppendHeader("session_cache_limiter", "none")
 Response.AppendHeader("Cache-Control", "max-age=1")
 Response.AppendHeader("Pragma", "public")
 Response.AppendHeader("Accept-Ranges", "none")
 Response.Buffer = False
 Response.AppendHeader("Content-Type", "octet-stream")
 Response.Buffer = True
 Response.Expires = 0
 Response.Cache.SetCacheability(HttpCacheability.NoCache)
 Response.CacheControl = "public"
 Response.Cache.SetCacheability(HttpCacheability.Private)
 Response.Expires = -1
 Response.AppendHeader("Pragma", "no-cache")
 Response.AppendHeader("Pragma", "must-revalidate")
 Response.CacheControl = True
</code></pre>
