Replacing control style properties with CSS


show more Replacing control style properties with CSS provides you with in-depth training on Developer. Taught by David Gassner as part of the ASP.NET Essential Training show less
please wait ...

Replacing control style properties with CSS

Once you have created an ASP.NET page that presents data, you can then start refactoring the page for use as a printed document. Refactoring a page for print has a couple of steps. First you might want to go into any ASP.NET controls that have explicit style settings, and replace those style properties with actual Cascading Style Sheet references. At runtime, you will be able to have two sets of styles, one for presentation on the screen and the other for printing, ASP.NET controls by default have explicit style properties. For this demonstration, I'm working with the file DisplayData.aspx, which has an SqlDataSource whose Select command joins multiple tables together, and then a GridView that presents the data using one of the auto-format settings.

let's take a look at the code for the GridView. I'll select the GridView and then go to Source View. Then I'll press Alt+Shift+Enter to go into full screen. In the GridView code down toward the bottom of the declarations, the...

Replacing control style properties with CSS
Video duration: 5m 49s 6h 24m Beginner Updated Feb 13, 2013

Viewers:

Replacing control style properties with CSS 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 ...