Display pdf file in asp.net

Discussion in 'ASP .Net' started by bharath_r, Sep 29, 2008.

  1. bharath_r

    bharath_r Guest

    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
    bharath_r, Sep 29, 2008
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. SG
    Replies:
    6
    Views:
    30,356
    ricuzzo
    Jan 15, 2008
  2. Ricardo Pog
    Replies:
    1
    Views:
    420
    Austin Ziegler
    Mar 26, 2008
  3. Sean Nakasone
    Replies:
    1
    Views:
    358
    Farrel Lifson
    Apr 14, 2008
Loading...

Share This Page