0
My btnDownloadArchitect_Click function.
protected void btnDownloadArquivos_Click(object sender, EventArgs e)
{
Response.ContentType = "application/octet-stream";
Response.AddHeader("Content-Disposition", "attachment; filename= " + nomeArquivo);
Response.CacheControl = "Private";
//Aqui dentro tem uma outra função qualquer.
Response.Flush();
Response.Clear();
Response.ClearContent();
HttpContext.Current.ApplicationInstance.CompleteRequest();
EscreveErroNaTela();
}
Inside the Typing() function has the following code.
ScriptManager.RegisterClientScriptBlock(this, GetType(), "Alerta", "alert('Alguns arquivos não puderam ser baixados. Clique no botão erros para maiores informações');", true);
This Scriptmanager.Registerclientscriptblock code works well, the problem is that in the btnDownloadArchies_Click function it has some conditions, and when entering this condition it fulfills some properties of Response, after a Flush, Clear, Clear content.
When it fills in these properties my Scriptmanager does not work, no alerts are displayed, which may be occurring?