Display pdf file in asp.net

B

bharath_r

Hi,

I am developing a web application where i want show a pdf file in a
web page. I want the pdf to occupy only a part of the webpage. I am
using a custom control as explained it the tutorial below.
http://www.beansoftware.com/ASP.NET-Tutorials/PDF-View-Custom-Control.aspx

Basically it uses iframe object.
<iframe src=//localhost/ManagedPay/fw9.pdf width=856px height=352px
<View PDF: <a href=//localhost/ManagedPay/fw9.pdf</a></p> </iframe>

It all works fine unless the pdf is in the same directory as the
project or is in a virtual directory. But in my project the pdf files
will be in a shared directory(not a virtual directory) on a different
machine, in which case i will have to do Response.WriteFile which will
give me a dialog saying you want to 'open' or 'save' the file. If i
say open, it will open the file in a different page which is what i do
not want to happen. Is there a way to get around this?

Thanks
Bharath
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top