Click here to Skip to main content
15,896,348 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
My code:
C#
protected void Page_Load(object sender, EventArgs e)
        {
            myframe.Attributes.Add("src", "/UploadJournal/okay3.pdf");
        }

Code in ASP.NET:
ASP.NET
<div>
    <iframe id="myframe" runat="server"></iframe>
    </div>


Problem: When I am running my program, it is trying to download the pdf file but, not showing in my page. Please solve this problem.
Posted

Hi,

Have a look here:
http://stackoverflow.com/a/11603354[^]
 
Share this answer
 
It depends on the browser how to display the pdf content... Most browsers do not support to display pdf inline. You need a custom solution.

Check this ASP.NET PDF Viewer User Control Without Acrobat Reader Installed on Client or Server[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900