Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

510
Visualizações
In Chrome, files cannot be downloaded if previous pop up window is not closed

In .aspx file:

<a href='#' onclick='download(\"" + fileID + "\");return false;'>Download</a>

In .aspx.vb file:

function downloadFile(inFileID) {
     window.open('../DownloadFile.ashx?id=' + fileID, 'file', 'width=600,height=800').focus()
}

In .ashx.vb file:

context.Response.AddHeader("content-disposition", String.Format("attachment;filename={0}", fileName))
context.Response.BinaryWrite(fileContent)

The downloaded file is shown at bottom of Chrome.

The situation: If the pop up window is not closed manually and then I click to download file again (no matter the same or different file), the code executed successfully without error but no file will be downloaded.

It is okay to download again if the pop up window is closed first.

How can I successfully download file again even the pop up window is not closed?

I planned to close pop up window through coding. However, the downloaded file list is shown at the bottom of pop up window. If it is closed, then I cannot view the files directly

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda