473,320 Members | 2,092 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,320 software developers and data experts.

How to print Iframe content along with the page content

I have a aspx page, say 'abc.aspx'.
Within that page i have 4 tab controls. The tab controls open as iframe.
I also have a print option on my page.(an anchor)
Expand|Select|Wrap|Line Numbers
  1. <a id="aPrint" runat="server" class="aspmarginclass" onclick="javascript:{fnprint();}">
  2.                         <asp:label id="lblPrint" style="cursor: pointer" runat="server" cssclass="aclass"></asp:label>
  3.                     </a>
I open one of the tabs, say 'tab1.aspx' and then click on print.

If the iframe content is long enough to fit in one page, then the page content and iframe content(tab content) is printed as expected and we get the printout of the whole page as we see it on the screen.

But if the iframe content is longer and it does not fit into a page then only the page content is printed and the iframe content is notprinted at all.

Please suggest a solution.

Thanks in advance.
May 20 '10 #1
2 3039
acoder
16,027 Expert Mod 8TB
There's not much you can do with JavaScript save for changing the layout of the page before printing (which is NOT a good idea).

What I would suggest is that you use CSS stylesheets to control printing. See for example
http://www.alistapart.com/articles/goingtoprint/
http://css-discuss.incutio.com/wiki/Print_Stylesheets
May 21 '10 #2
@acoder
I have already changed the css and checked but that as well has not helped.
May 26 '10 #3

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

Similar topics

2
by: ChadDiesel | last post by:
I have a report (labels) that print 1 record per page. How can I print 2 of each in this order: Page 1, Page 1, Page 2 Page 2, Page 3 Page 3...? I'm using-- DoCmd.OpenReport "Label",...
1
by: Lubo¹ ©lapák | last post by:
Hi, Can I, after click on button, from Iframe in aspx page refresh this whole aspx page? Thanks Lubos.
4
by: Richard St?en | last post by:
Hi! We are experiencing a problem with running an .aspx page inside an iframe. The .aspx page is loading perfectly the first time (on load), but when we try to interact/navigate within the .aspx...
2
by: MLibby | last post by:
How can an IFrame's aspx page force a server-side redirect on its parent page? Typically, an IFrame's client-side javascript specifies '_top' to change the parent page... ...
2
by: hgl1976 | last post by:
Hi! I have a web page that from a query that loads the search result into an iframe on the page. In the search result inside the iframe i would like to be able to load content into div tag that...
2
by: knkk | last post by:
I have an iframe in a page (with a name to the iframe), and in that iframe I have several anchors <a name="something"> There are links in the iframe that look like <a href="#something"> ...
3
by: Francois | last post by:
I plan a master page / content page design for next application. The master page would contain some standard button for my app. For instance a "Save" button. (present on all pages). But how...
4
by: Joe Kovac | last post by:
Hi! I would like to create a page, where the user can print the lower part of the page by pressing a button. It might look like this: ----------------------------------------------- o...
2
by: JRough | last post by:
I have this code that switches templates depending on if the user fills in a form with a request. The request asks for the $mark & $number. If that request gets input then it displays a list...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.