469,307 Members | 2,239 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,307 developers. It's quick & easy.

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 2850
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

Post your reply

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

Similar topics

2 posts views Thread by ChadDiesel | last post: by
1 post views Thread by Luboą ©lapák | last post: by
4 posts views Thread by Richard St?en | last post: by
3 posts views Thread by Francois | last post: by
4 posts views Thread by Joe Kovac | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by suresh191 | last post: by
reply views Thread by harlem98 | last post: by
reply views Thread by harlem98 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.