473,396 Members | 2,099 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

How do I open a pdf inside a panel in a ASP.Net 3.5 webpage

62
Hi Guys,

I have a website with one master page and multiple other pages. On the page in question I have a Place holder and a panel inside that page.

When the page opens I want a .pdf displayed inside the panel.

The pdf file is inside a folder in the project called "documents". The pdf is called "BeginnersGuide.pdf"

the user simply needs to be able to read th epdf and use a scroll bar to scroll down or across.

I am very new to web programming so any assistance would greatly be appreciated. Please ask if you require any more information.

Thanks,

Lóan.
Attached Images
File Type: jpg pdfproblem.jpg (12.2 KB, 845 views)
Jan 31 '10 #1

✓ answered by Frinavale

PDF is a document format that requires Adobe's Reader to be installed in order to view the document.

Typically browsers have a plugin version of Adobe's PDF reader installed so that you can view PDF files within the browser.

The thing is that this is a plugin and it depends on the browser that your user is using.

I'm not sure how you would do this without using an iFrame element really....iFrames always make things complicated though.

This is how I see it working...

You will need to have an iFrame (instead of a Placeholder) on the page where you want the PDF to be displayed. An iFrame defines an inline frame that contains another document...which pretty much means that it lets you have a "window" within another window. It lets you load a "web page"/document within another web page.

You will have to specify the URL to the PDF using the iFrame's "src" attribute.

Now the iFrame will load the PDF document from the URL that you specified...and it will display it where you have placed it in the page.

If the user does not have an Adobe Reader plugin installed in the browser will let the user download the document to their computer. This is because the browser does not know how to handle this type of data and so it lets the user decide what to do.

-Frinny

5 8151
Frinavale
9,735 Expert Mod 8TB
PDF is a document format that requires Adobe's Reader to be installed in order to view the document.

Typically browsers have a plugin version of Adobe's PDF reader installed so that you can view PDF files within the browser.

The thing is that this is a plugin and it depends on the browser that your user is using.

I'm not sure how you would do this without using an iFrame element really....iFrames always make things complicated though.

This is how I see it working...

You will need to have an iFrame (instead of a Placeholder) on the page where you want the PDF to be displayed. An iFrame defines an inline frame that contains another document...which pretty much means that it lets you have a "window" within another window. It lets you load a "web page"/document within another web page.

You will have to specify the URL to the PDF using the iFrame's "src" attribute.

Now the iFrame will load the PDF document from the URL that you specified...and it will display it where you have placed it in the page.

If the user does not have an Adobe Reader plugin installed in the browser will let the user download the document to their computer. This is because the browser does not know how to handle this type of data and so it lets the user decide what to do.

-Frinny
Feb 1 '10 #2
LoanB
62
Hi Frinny,

Thank you very much. That helps me a great deal. I will get working on it right way.
Feb 1 '10 #3
LoanB
62
Hi Frinny , May I ask another question related to the above:

I now have the iFrame and my pdf opens perfectly inside it. But now I have the problem that the menus are dropping down behind the iframe.

The Menu is created on the Master Page. The link to my site is: http://www.loanburger.com/CapeEpic.aspx

Any idea on how to fix this please? I read up that I need to set a z-index but I have no idea where to do that.

Thank,

-Loan
Feb 3 '10 #4
Frinavale
9,735 Expert Mod 8TB
Yeah, I'm not so sure about how to help you with that one.

This question would be better asked in the HTML/CSS forum.
I believe it will have something to do with setting the position and z-index styles of the elements.

Re-post your question with a link to your website in the HTML/CSS and the experts there should be able to help you figure it out.

-Frinny

(PS I just started to do off road mountain biking last year! Looking for a better seat for next season :) )
Feb 3 '10 #5
LoanB
62
Thanks mate.

For a saddles - I now ride a specialized phenom sl saddle. Very comfortable.

Enjoy.
Feb 3 '10 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: John | last post by:
I have a panel on a webpage. I use client Javacript to manipulate its visibility using something like: Panel.style.display = 'none'. During a postback, getting the Visible attribute always...
3
by: Kuldeep | last post by:
Hi All, How can i mail the current open page? The open page contains some data (which vary every time page is opened), textbox to enter email id and send button. When the send button is clicked...
8
by: fernandezr | last post by:
I would like to use a user control as a template inside a repeater. Some of the fields in the control should be hidden depending on whether or not there is data. I'm still a ASP .Net newbie so the...
4
by: =?Utf-8?B?Rmx5Z3V5?= | last post by:
How can I update the html inside of a panel? How can I make this code work <%@ Page Language="C#" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"...
3
by: toffee | last post by:
Hi all, I got a pre-formatted spreadsheet. would it be possible using js to copy the data from a table on the current webpage, open the spreadsheet and paste the content ? if so, anyone got any...
0
by: de4ever | last post by:
I have used open/save dialog box inside update panel in asp.net.but it is not working because of the code line Response.WriteFile(path);.Can i use any thing else for opening a file through open/save...
6
by: jojoba | last post by:
hi everyone! i'm serving up an asp.net page using ajax futures. long story short: i have two update panels. one has a webpage in it (e.g. www.google.com). the other has an image inside of a...
1
by: semomaniz | last post by:
I have a panel set up in a webpage and inside that panel i have various labels and textboxes setup. I am trying to assign a value to the label when the page loads. panel is named cpanel and a...
3
by: Gandalf | last post by:
why when I try to insert gridSizer to a panel which already inside another panel the gridSizer doesn't work? this is the code: panel3= wx.Panel(self, -1, (0, 60), size=(400, 240) ,...
1
by: semomaniz | last post by:
I have a button inside a repeater which is supposed to open a popup when clicked. But when i click on the button my modalpopup does not open. The strange thing is on the code provided below if i...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.