Selected Content

ASP.NET 2.0 - Master Pages

By: Joel Martinez on Thursday, August 18, 2005
Reader Level: Reader Level


Primary Category: ASP.NETI remember the first website "job" I ever had. My uncle had a small sci-fi collectibles shop and wanted to sell his wares online. I jumped at the chance because I was quickly learning that without experience, I'd never be able to get a paid gig, and without a gig, I would never be able to get experience.

So there I was, webmaster of my very own website. I quickly set off creating product pages for every type of merch he sold: Star wars, Buffy the Vampire Slayer, Comics ... he had quite the stock. Everything was going peachy until he wanted to change the layout of the site. That thrust me into a week long project of changing every page, for every product. It was hell. And To top it off, once I was done he happened to be moving his shop's location which meant I had to update the address on Every. Single. Page.

What does this have to do with anything you might care about? Well, fast forward a few years to the here and now. Microsoft is about to release v2.0 of it's ASP.NET platform. One of the new features, and star of this article, is Master Pages.

Well, perhaps "new" is a misnomer. Originally created by a third-party developer when ASP.NET was first released, Master pages is now baked into the platform proper. It works by allowing you to define templates. Within these templates you define zones which implementing pages will fill with gobs and gobs of wonderful content. One quick change to the template, and you can have that address updated in a matter of seconds.

The code presented in this article only requires that you have a webserver running the latest version of ASP.NET 2.0. No compilation is needed to get up and running.

Purchase this item
You can purchase this piece of content separately for $3.00

Want more?
Community MX members get unlimited access to daily articles, tutorials, extensions and support. The most comprehensive resource for Macromedia designers and developers today. Take a tour of what we offer, and discover the benefits of subscribing.

Already a member?
Simply log in using the form in the top right area of the site.