C# – Start a File Download in ASP.NET
by admin on Sep.11, 2013, under Programming
The following Microsoft ASP.NET example code will transmit a file to the client. Please be aware that the function GetMimeMapping requires .NET 4.5 or higher.
System.IO.FileInfo fi = new System.IO.FileInfo("hello.txt"); string name = fi.Name; string length = fi.Length; Response.Clear(); Response.ClearHeaders(); Response.ClearContent(); Response.AddHeader("Content-Disposition", "attachment; filename=" + fi.Name); Response.AddHeader("Content-Length", fi.Length.ToString()); Response.ContentType = System.Web.MimeMapping.GetMimeMapping(fi.FullName); // .NET 4.5+ (!!) Response.Flush(); Response.TransmitFile(fi.FullName); Response.End();
October 9th, 2013 on 21:38
All over the world there are NO cracks for “iolo system mechanic pro v12.0” and we wish that you can help us with an activator for this version because the old activators couldn’t activate this version.thank you very very very much “betamaster”(mastermind).