Know the answer? Post it. Somebody with the same question will find it here.
Abhimanyu K VatsaRank #14 · 51.7K reputationPosted Jun 2, 2010, 3:43 AM EDT
0
Hello Vipin.......
It is very easy to print the content of div tag in web page. You only have provide the particular id for your div tag which will be printed. I am showing you quick method to solve it out.
*********************************
Code
Content-Type" content="text/html; charset=iso-8859-1">
@media print {
body * {
display:none;
}
#print_div {
display:block;
}
}
div>Won't be printeddiv>
div id="print_div">This gets Printeddiv>
div>Not printeddiv>
*********************************
I hope my post will help you, mark as accept my answer.
vipin saini87 reputationPosted Jun 2, 2010, 3:46 AM EDT
0
but how on button click event
0
Abhimanyu K VatsaRank #14 · 51.7K reputationPosted Jun 2, 2010, 3:49 AM EDT
0
Now take a look at Print Preview from your browser's File menu bar. I will show you magic of CSS. you can also integrate it with any other control like a link which has "Print" label or a button which has caption "Print". Accept my answer if helped.
Abhimanyu K VatsaRank #14 · 51.7K reputationPosted Jun 2, 2010, 3:43 AM EDT
It is very easy to print the content of div tag in web page. You only have provide the particular id for your div tag which will be printed. I am showing you quick method to solve it out.
*********************************
*********************************
I hope my post will help you, mark as accept my answer.
Good Luck
vipin saini87 reputationPosted Jun 2, 2010, 3:46 AM EDT
Abhimanyu K VatsaRank #14 · 51.7K reputationPosted Jun 2, 2010, 3:49 AM EDT
vipin saini87 reputationPosted Jun 2, 2010, 3:52 AM EDT
Abhimanyu K VatsaRank #14 · 51.7K reputationPosted Jun 2, 2010, 3:52 AM EDT
Abhimanyu K VatsaRank #14 · 51.7K reputationPosted Jun 2, 2010, 3:54 AM EDT
vipin saini87 reputationPosted Jun 2, 2010, 4:06 AM EDT
Abhimanyu K VatsaRank #14 · 51.7K reputationPosted Jun 2, 2010, 5:34 AM EDT
Above code is also working.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questionsTop experts