954,595 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

How to Open PDF document in asp.net web page without asking save/open/cacel dialogue

Hi,

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.

Rakesh

rakeshbpatel
Newbie Poster
3 posts since May 2008
Reputation Points: 10
Solved Threads: 0
 

Hi there Rakesh here is a great site that fully explains how to open a PDF without the dialog box:

http://www.beansoftware.com/ASP.NET-Tutorials/PDF-View-Custom-Control.aspx

I hope this helps! Please don't forget to mark the thread as solved!:)

majestic0110
Nearly a Posting Virtuoso
1,328 posts since Oct 2007
Reputation Points: 256
Solved Threads: 72
 

Hi,

Thanks for your prompt reply.

I had tried the same things also but it invokes the dialogue box for saving/opening.

Regards,
Rakesh

rakeshbpatel
Newbie Poster
3 posts since May 2008
Reputation Points: 10
Solved Threads: 0
 

hmmmm are you sure that gives a dialog pop up? Try this one:

http://geekswithblogs.net/azamsharp/archive/2005/09/18/54294.aspx
majestic0110
Nearly a Posting Virtuoso
1,328 posts since Oct 2007
Reputation Points: 256
Solved Threads: 72
 

try a response.redirect to the document. i should not ask.

ericstenson
Posting Whiz in Training
Team Colleague
295 posts since Dec 2007
Reputation Points: 14
Solved Threads: 29
 

Hey, maybe

Response.Redirect("pdfpath/pdfdoc.pdf");


is what you're looking for?

laurichi
Newbie Poster
1 post since Apr 2009
Reputation Points: 10
Solved Threads: 0
 

EXCELLENT SINGLE LINE ANSWER! laurichi

cybernaresh
Newbie Poster
1 post since Nov 2007
Reputation Points: 10
Solved Threads: 0
 

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:
http://support.microsoft.com/kb/307603/EN-US/
I think its a better solution, but what ever you like.

IdanS
Junior Poster in Training
96 posts since Jun 2009
Reputation Points: 22
Solved Threads: 13
 

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.

http://www.protalk.in/dotnet/how-to-display-pdf-documents-with-asp-net-part-1/

http://www.protalk.in/dotnet/how-to-display-pdf-documents-with-asp-net-part-2/

rajeshprasath
Newbie Poster
1 post since Oct 2010
Reputation Points: 10
Solved Threads: 0
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You