I must say that master pages are really
really cool. At first I was concerned that Master Pages was going to
force everything that you did to be in tables thus taking CSS out of the picture. I was mainly concerned about this because I can see the benefits that CSS can offer to web developers and want to use this really cool and useful technology.
When
I first saw Master Pages being used I would look at the code and see
almost nothing but tables being used for positioning of objects and it
was annoying because after all I want to use CSS. So I proceeded to start and learn CSS anyway hoping that I could just override the default output that Master Pages used.
Well I have learned quite a bit about CSS
now, basically I am confident with it, and just took a look at Master
Pages. I must say I was impressed by them the blew me away with the
possibilities. I am still learning them so some of the problems I
forsee are probably solved. Let me first explain a little bit about
master pages first.
Master Pages is a new technology in ASP.NET
2.0 that allows for a unified look and feel of a website without having
to go in and customize individual pages, which can take up hours. With
master pages you make a sing master page that has the look and feel you
want across all pages such as the most common things menu, banner, and
footer. Now user controls reduced the time it took to do this
significantly, but Master Pages is just where it is at.
Now CSS
offers pretty much the same thing. You make up your classes for your
divs with positioning font information yada yada yada. Now Master Pages
makes it faster than CSS, but if it outputs
to tables, then where are the web standards? This was my big worry. I
want to make standards compliant websites using ASP.NET.
Well here is the cool part. You can use CSS to do the layouts on the Master Page. In fact Master Pages compliments CSS and vice versa. You now only have to make the CSS file, and apply all the classes and ids to one file instead of 20. Now tell me that is not awesome.
What does this mean?
Well it increases the possibilities of standards compliant ASP.NET
websites. It allows for less time in development because now you can
focus more on the code that is important instead of menial looks. You
can now write the whole backend for that amazon.com clone and don’t
have to worry about the useless front end.