My ASP.Net page is supposed to create a document and force its download (open a "File Download" dialog). It works fine on most browsers but for some reason, on IE6 SP1 (windows 2000) the "File Download" dialog opens twice. Any ideas why?
My very simple code (C#):
protected void bnCreateDocument_Click(object sender, EventArgs e)
{
string documentText = GetDocumentText();
Response.Clear();
Response.Charset = "";
Response.ContentType = "application/msword";
string filename = "MyDoc.doc";
Response.AddHeader("Content-Disposition", "attachment;filename=" + filename);
Response.Write(documentText);
Response.End();
Response.Flush();
}