Suppressing elements in printed web pages


show more Suppressing elements in printed web pages provides you with in-depth training on Developer. Taught by David Gassner as part of the ASP.NET Essential Training show less
please wait ...

Suppressing elements in printed web pages

In ASP.NET pages that you want to prepare for printing, there are times when there are elements that you see on the screen that you don't want to appear on the page. In this example, I'm working with the file SuppressingElements.aspx. I'll press Ctrl+F5 to run the page in the browser and then I'll show the same page in Print Preview. Notice that the menu, that is, the elements on the page that appear on the screen that allows the user to navigate around the website, also appear on the printed page. I would like to suppress that element, so it doesn't appear when the document is printed. There are two steps you have to follow for this. First of all, the element that you want to hide must have a unique ID and that unique ID can't change each time the page loads.

You have to deal with the actual HTML elements and so you might have to do a little bit of diagnosis on your page to find out how the element IDs are being generated. Let's run the page again. This time ...

Suppressing elements in printed web pages
Video duration: 5m 47s 6h 24m Beginner Updated Feb 13, 2013

Viewers:

Suppressing elements in printed web pages provides you with in-depth training on Developer. Taught by David Gassner as part of the ASP.NET Essential Training

Subjects:
Developer Web
Software:
ASP.NET
Author:
please wait ...