>What do I have to change to get the dialog? I thought the "attachment;" part was enough.Case solved. Turns out it's fixed by simply changing these two lines:
Response.ContentType = "application/download";
Response.AddHeader("Content-Disposition", "attachment;filename=" + sFileName);