How to Open PDF document in asp.net web page without asking save/open/cacel dialogue .
I have tried but every time it prompts for saving/opening or cancel action.
Thanks in advance.
Hi there Rakesh here is a great site that fully explains how to open a PDF without the dialog box:
I hope this helps! Please don't forget to mark the thread as solved!:)
Thanks for your prompt reply.
I had tried the same things also but it invokes the dialogue box for saving/opening.
try a response.redirect to the document. i should not ask.
is what you're looking for?
EXCELLENT SINGLE LINE ANSWER! laurichi
I'm not sure that is the right solution, because if you redirect to a pdf file so the user on the other side has to have AcrobatReader on his machine, AcrobatReader know to open the file on the explorer, think of it as en addin to explorer so with out it the explorer does not know how to open the PDF file.
There is a simple solution posted by Microsoft in the next link:
I think its a better solution, but what ever you like.
There are various approaches used to display PDF documents in a webpage. Displaying PDF documents in a webpage using simple ASP.NET custom server control or Directly rendering the PDF documents on the webpage. So if you want to know more details on these approaches, you can refer following links.