using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.IO; using System.Data; using System.Data.SqlClient; using System.Text; using System.Configuration; using System.Data.Sql; using System.Media; namespace PDF_Files { public partial class DownloadFile : System.Web.UI.Page { File myFile = null; protected void Page_Load(object sender, EventArgs e) { Response.ContentType = "application/x-uknown"; Response.AppendHeader("Content - Disposiotion", "atachment;filename=\"" + myFile.OriginalName + "\""); if (myFile != null) { Response.BinaryWrite(myFile.FileData); } else { Response.WriteFile(Path.Combine(AppConfiguration.UploadFolder, myFile.FileUrl)); } } } }
File.Create("/path/myFile");
File Class Sample
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)