Download File and send email in asp.net
<p>How to exceute code after response.redirect?
I want to force file download using response.redirect , once the file is downloaded i wanted to show modal pop up to send email.</p>

<p>but after response.redirect the popup is not getting called.
Pls help me how to do this,</p>

<p>Thanks</p>

<p><br /><br />
<strong>UPDATE:</strong><br>
Thanks for your reply.
I am doing like this. any suggestions?</p>

<pre><code>Response.AddHeader("Content-Disposition", "attachment;filename=" + FileName.Name);
                long FileSize = myFile.Length;
                byte[] Buffer = new byte[(int)FileSize];
                myFile.Read(Buffer, 0, (int)FileSize);
                myFile.Close();

                Response.BinaryWrite(Buffer);
                // Response.Redirect(filepath,false);
                Response.Flush();
                Response.Close();
                ScriptManager.RegisterStartupScript(this, this.GetType(), "ShowPopup", "window.setTimeout('PopupModal()',50);", true);
</code></pre>
