Last post May 02, 2017 04:00 PM by PatriceSc
Apr 27, 2017 11:58 AM|sanjaykumar pushadapu|LINK
context.Response.Buffer = true;
context.Response.ContentType = "application/pdf";
context.Response.AddHeader("content-disposition", "inline; filename=download");
my code working not properly
Apr 27, 2017 05:00 PM|PatriceSc|LINK
Rather than "doesn't work" tell what happens and I'm not sure to get what you call the "asp.net Handler header name".
My understanding is that you want to control the name of the downloaded file ?
context.Response.AddHeader("content-disposition", "attachment; filename=\"download.pdf\"); should work.
Edit: ah if using an ASPX page to serve a file you could also try a Response.Clear to get rid of unwanted markup at the top of fhe file. Or you want to show the file inline but to change what is shown in the browser address bar ??? (I don't think you can
do that directly, I would just create a Handler that will respond at the exact url I pointed it to).
May 01, 2017 04:12 AM|sanjaykumar pushadapu|LINK
yes How can I change title name the Adobe Reader toolbar when displaying a PDF in the .NET WebBrowser control?
May 02, 2017 04:00 PM|PatriceSc|LINK
Try perhaps https://www.w3schools.com/tags/tag_title.asp. You are trying to use a browser window to show a PDF file? What is shown for now, the name of the file? This is what I would expect and I'm
not sure it can be changed unless showing some minimal HTML markup to use the title tag and then use the whole window body to show PDF content.