내 ASP.Net 페이지에서 문서를 만들고 강제로 다운로드해야합니다 ("파일 다운로드"대화 상자 열기). 대부분의 브라우저에서 정상적으로 작동하지만 IE6 SP1 (Windows 2000)에서 "파일 다운로드"대화 상자가 두 번 열립니다. 이유가 무엇입니까?강제 다운로드시 : IE6 SP1에서 파일 다운로드 대화 상자가 두 번 열립니다.
내 매우 간단한 코드 (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();
}
브라우저 (IE6 SP1)의 일부로 설치된 브라우저 추가 기능이 있는데,이 링크를 통해 "저장 ..."대화 상자를 사용할 수 있습니까? – shahkalpesh
멋진 아이디어이지만 아니요. 나는 새로 설치 한 시스템에서 그것을 시도했지만 여전히 발생합니다 ... – Zackie