Hola,
Hope all are doing good !!!!
In some situations say during exam results time we need to design pages in such a way that whenver users clicks the HTML marks page for Printing. The controls on the page like textbox and some text must be hide. So use the below code:
Step 1
=====
Insert this code between tags.
p {
color:#00f;
font-family:Arial;
font-size:10pt;
}
a { color:#0f0; }
@media print {
.hideWhilePrinting { display:none; }
}
Step 2
======
To hide a text use this:
<label id=”lblhall” class=”hideWhilePrinting” >Enter Hall Ticket</label>
To hide a Print button use this:
<input class=”hideWhilePrinting” onclick=”javascript:window.print();” type=”button” value=”Print” name=”Submit” />
Just apply the class to the control thats all.
Source: http://www.div-tags.com/demos/css/hide-from-print/
Ciaoooooo