Open file from browser

Response.ContentType = “application/pdf”;

Response.AddHeader(“content-disposition”, “attachment; filename=” + path);

Response.WriteFile(path);

HttpContext.Current.ApplicationInstance.CompleteRequest();

 

Note. Comment second line to hide download file dialog OR change with this line

Response.AddHeader(“content-disposition”, “inline; filename=” + directory + pathFile);

Anuncios