string filePath ="c:\\falan\\filan.jpg"
byte[] buffer = File.ReadAllBytes(filePath);
Response.ContentType = "image/jpeg";
Response.OutputStream.Write(buffer, 0, buffer.Length);
Response.AddHeader("Content-Disposition", "filename=filan.jpg");
filename yanına ";attachment" eklersek sayfa açılırken dosyayı indirmeye başlayacaktır
ContentType : application/pdf, image/jpeg , image/png, image/bmp
gibi
Kaydol:
Kayıt Yorumları (Atom)
.net 6 mapget kullanımı
app.UseEndpoints(endpoints => { endpoints.MapGet("/", async context => { var response = JsonConvert.Seriali...
-
XAMPP Apache MySQL PHP 5 PHP 4 1.8.3 2.4.9 5.6.16 5.5.11 1.8.2 2.4.9 5.5.36 5.4.27 1.8.1 2.4.3 5.5.27 5.4.7 1...
-
var mystring = "this,is,a,test" mystring . replace ( /,/ g , "newchar" ); DEMO: http://jsfiddle.net/d4N9s/
-
For .NET 4.5+: C:\Program Files (x86)\Microsoft Visual Studio {YourVersionHere}\Common7\IDE VS 2015: C : \Program Files ( x86 ) \...
Hiç yorum yok:
Yorum Gönder