I think there is a much easier solution to your problem.
If you have one page and only want to print certain content on that page you can create a Print Style Sheet (Css2 Print Reference).
Just place the content that you don't want to be printed in panels that are set to a class that has "display:none" set when printing the page.
Please do not double post your question.
-Frinny
but my problem is different,
i'll explain it in brief..
i have three <div> in my page.
1st <div> have some textboxes etc
2nd <div> have some more data
now my third <div> has a <iframe>
and i have a print button on my page irrespective of my division, now when i click on this print button, the data on <div> 1st and 2nd prints fine but for 3rd <div> as it has iframe it just prints one page( i know the page i m trying to print in around 3 pages) , basically my problem is what should i add in my code so that i prints every thing in iframe + other data on my page in one go.
Regards