protected void Page_Load(object sender, EventArgs e) { //Set the appropriate ContentType. string FilePath = MapPath("Test/xyz.pdf"); Response.Buffer = true; Response.Clear(); Response.ClearContent(); Response.ClearHeaders(); Response.ContentType = "Application/pdf"; Response.AddHeader("content-disposition", "inline; filename=\"" + "xyz.pdf" + "\""); Response.Write(FilePath); Response.End(); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)