สำหรับ
c#
ใช้
<link rel="stylesheet" href="print.css" type="text/css" media="print" />
แล้วให้เพิ่มบรรทัดนี้ในไฟล์ print.css ด้วยค่ะ
body {visibility:hidden;}
.print {visibility:visible;}
ต่อมาก็ให้กำหนด class="print"
ในหน้าเวปเพจในส่วนที่ต้องการพิมพ์ค่ะ
สำหรับ
JavaScript
ใช้เมทธอด
window.print()
Supa Sethasiripong [MSFT]
MSDN Community Support |
Feedback to us
Get or Request Code Sample from Microsoft
Please remember to mark the replies as answers if they help and unmark them if they provide no help.