finance_teacher
asked on
ASP.Net MVC 4 C# -- print only @RenderBody() content ?
How can I do something like the below "site-wide" ?
Steps
1. user opens webpage
2. clicks "Printer" ICON on any page
3. only the \Views\Shared\_Layout.csht ml @RenderBody() content prints,
none of the other header/footer details print
Steps
1. user opens webpage
2. clicks "Printer" ICON on any page
3. only the \Views\Shared\_Layout.csht
none of the other header/footer details print
ASKER
Can you provide a FULL example or webpage talking about this ?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
The below work, I just needed to make sure IE did not cache my CSS each time.
@media print
{
header { display: none; }
}
@media print
{
h1, h2, h3 { display: none; }
}
@media print
{
header { display: none; }
}
@media print
{
h1, h2, h3 { display: none; }
}
use the following media query and place the css inside this block:
For example:
Open in new window