Tüm tarayıcılarda çok büyük bir sorun yaşıyorum.HTM olarak CSV yüklemeleri
İstemcilerin ihtiyaç duydukları ayrıntıları içeren bir csv dosyası indirebilecekleri bir sitem var.
Yaşadığım sorun, csv dosyasının uzantı içermeyen veya htm dosyası olarak indirilmesidir.
Kodda .csv ile dosya adını belirtiyorum, sunucudaki dosya da .csv'dir. Ben context.Response.ContentType = "text/html";
ve context.Response.ContentType = "application/octet-stream";
çalıştılar
context.Response.Buffer = true;
context.Response.Clear();
context.Response.ClearHeaders();
context.Response.ContentType = "text/csv";
context.Response.AppendHeader("Content-Disposition", @"attachment,
filename=" + ((string)Path.GetFileName(downloadFilePath)));
context.Response.WriteFile(downloadFilePath);
context.Response.Flush();
context.Response.Close();
şöyle
kodudur.
IIS6'da çalışıyor.
Buna neyin neden olabileceğini bilen var mı?
Hangi tarayıcıda? –
@NicholasMurray _Bu tarayıcıda büyük bir sorun yaşıyorum. – EaterOfCode
@EaterOfCorpses - ve 'tüm tarayıcılardan' hangi tarayıcıları bulabilirsin? IE 5, Firefox 1? –