Don't hold your breath trying to get a web browser to open an .exe file... Danger, Will Robinson... Danger...
Anyway, here's a code snippet....
Response.Clear();
Response.ContentType = "application/octet-stream";
Response.AddHeader("Content-Disposition", "attachment; filename=" + downloadName);
while (dataToRead > 0)
{
if (Response.IsClientConnected)
{
fileLength = iStream.Read(buffer, 0, buffer.Length);
Response.OutputStream.Write(buffer, 0, fileLength);
Response.Flush();
dataToRead = dataToRead - fileLength;
}
else
{
dataToRead = -1;//prevent infinite loop if user disconnects
}
}
Edit: Alright, I guess you could set up a thank-you page with a hidden button, inject some JavaScript to automatically click that button when the page loads, triggering the code to send the file through the response stream.