Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

css printing with an asp.net masterpage

Status
Not open for further replies.

LonnieJohnson

Programmer
Apr 16, 2001
2,628
US
I have an asp.net application.

Within there is a master page.

Inside the content holder on one of the pages I have a datagrid and some other controls.

When printing I want to make all the other controls invisible and only print the grid.

My link to the style sheet is on the master page.

Code:
    <link type="text/css" href="printViewResults.css" rel="stylesheet" media="print"/>

How do I reference my controls that I want to hide that are inside the content area of my page?

Thanks.

ProDev, MS Access Applications
Visit me at ==>
May God bless you beyond your imagination!!!
 
if you gave them id's use that:

Code:
<form id="myform"....>

inside CSS stylesheet:
#myform{
display: hidden;
}





----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
 
Since you are using .NET, I assume that ID's are automatically assigned to your form elements, so you can't assign ids. I'd give them all a specific class name.

Code:
<input class="hideThis" ..... />

CSS:
.hideThis {
   display:none;
}



[monkey][snake] <.
 
Thanks. I decided to go with a crystal report. Thanks again.

ProDev, MS Access Applications
Visit me at ==>
May God bless you beyond your imagination!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top